[Gambas-user] Sleep and Wait timing accuracy?
Jussi Lahtinen
jussi.lahtinen at gmail.com
Wed Feb 24 00:54:31 CET 2021
> The Sleep instruction use the nanosleep() system call until the
> specified time has expired.
>
Ah, OK of course...
Look at mTest.DoTests line 1485 (attachment).
"Sleep 0.01" should sleep for 10 ms, and anything within 15 and 5 ms is
approved. Sometimes rarely this fails.
This is of course, because my kernel is not running in real time mode. I
think there should be a warning about it in the documentation,
because someone might use Gambas in raspi or similar to control robotics
etc.
> The Wait instruction calls the event loop. Event handlers can block it,
> so you have no guarantee at all on when Wait will return.
>
This is what I expected of "Wait". So, I'm giving it quite big tolerances
when testing it.
Jussi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210224/3096c4cf/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GambasTestercmd-0.10.24.tar.gz
Type: application/gzip
Size: 30260 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210224/3096c4cf/attachment-0001.gz>
More information about the User
mailing list