Places the current thread in the sleep state until the required period in milliseconds occurs. This call differs from RtSleep in that it uses the low-level clock to wait the required number of milliseconds. By default the low-level clock is configured for 500 us so a more precise interval is possible compared to RtSleep.
Note: The actual time expired from execution of this call to the end of dwMilliseconds
varies depending upon how much time remains until the next system timer tick.
BOOLEAN RtSleepEx ( DWORD dwMilliseconds );
dwMilliseconds
1 - 0xFFFFFFFE |
The number of milliseconds the thread sleeps, after which it awakes.
Note: The kernel converts milliseconds to system timer ticks. Note: The value 0xFFFFFFFF (INFINITE) is illegal. |
NO_WAIT | The thread does not wait. |
The maximum possible value of dwMilliseconds depends on the configured kernel tick. Internally to this call a number of kernel ticks is calculated from the dwMilliseconds parameter, the maximum number of kernel ticks to wait is 0xfffffffe.
TRUE
FALSE
E_OK 0x0000
E_PARAM 0x8004
dwMilliseconds
contains the invalid value INFINITE (0xffffffff)
. Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 3.0 | intime/rt/include/rtbase.h | rt.h | rt.lib |