Page 1 of 1

OSTimeDly delay time question

Posted: Sun Dec 27, 2020 10:15 pm
by jaypdx
Does OSTimeDly block for AT LEAST the specified number of ticks? So, for example, if I use OSTimeDly(10) and TICKS_PER_SECOND=20 will the current task block for at least 500ms? Would OSTimeDly(1) block for at least 50ms?

Re: OSTimeDly delay time question

Posted: Mon Dec 28, 2020 6:29 am
by pbreed
If blocks to the next tick....
Ticks are asyncronous...


So OSTimeDly(2) will block for 1 to 2 ticks... if call right before the next tick it will block for 1 tick.
If called just after the last tick it will block for 2...


So blocks for (n-1) to n ticks....

Re: OSTimeDly delay time question

Posted: Mon Dec 28, 2020 1:57 pm
by jaypdx
Perfect... just what I needed to know.

Thx