"RokuKevin" wrote:
I looked into the wait() inaccuracy on the Roku 2, and unfortunately we have had an open bug on this platform that affects both wait() and sleep(). Enabling the high resolution timer in these methods caused instability in the firmware so it is currently disabled. We'll have to fix these before using wait() or sleep() becomes a viable option for this use case.
In the meantime, you could use the rotimespan component to get a high resolution timer and check for events in the busy-wait loop with a call to msgport.getmessage() (which does return immediately whether there's a message or not).
Has this been fixed yet? I.e. can we rely on accurate wait() and sleep()?
The linked msg was showing wait(1, port) takes at least 15ms on ARM platform (and that, as he pointed out, is 50% of time interval available per frame at 30fps)
It has been over a year and currently doco for
roMessagePort.WaitMessage() and
wait() and
sleep() makes no qualifications, so one would imply precision and accuracy are under 1ms (i.e. you get what you ask for).
If on the other hand that was never addressed and is here to stay, can we get statement what's the resolution/granularity in those functions work and update the documentation?