OSTimeDly delay time question

Discussion to talk about software related topics only.
Post Reply
jaypdx
Posts: 29
Joined: Wed Oct 15, 2014 6:06 pm

OSTimeDly delay time question

Post 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?
User avatar
pbreed
Posts: 1088
Joined: Thu Apr 24, 2008 3:58 pm

Re: OSTimeDly delay time question

Post 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....
jaypdx
Posts: 29
Joined: Wed Oct 15, 2014 6:06 pm

Re: OSTimeDly delay time question

Post by jaypdx »

Perfect... just what I needed to know.

Thx
Post Reply