Hello!
Assuming an OS timer tick interval of 5ms, os_wait() returns exactly after 5ms with the code as follows:
while (1) { os_wait(K_TMO, 1, 0); }
However, with the code like that:
while (1) { os_wait(K_SIG, 255, 0); os_wait(K_TMO, 1, 0); }
the second call to os_wait returns after something beetween 0 and 5ms.
I have read somewhere that os_wait(K_TMO, 1, 0) only waits until the next timer tick but why only in the second case?
Regards, Markus
but why only in the second case?
Oh, but it does that in the first case, too! You just can't tell the difference without any influence to make the time you start that os_wait() different from "immediately after a tick".
View all questions in Keil forum