INtime SDK Help
RtSleepEx
INtime SDK v7 > About INtime > INtime Kernel > Threads > RtSleepEx

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
);

Parameters

dwMilliseconds
The time period for which the calling thread waits.
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.

Notes

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.

Return Values

TRUE
Success.
FALSE
Failure. To determine the status, call GetLastRtError.

Status

E_OK 0x0000
No exceptional conditions occurred.
E_PARAM 0x8004
dwMilliseconds contains the invalid value INFINITE (0xffffffff).

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/rtbase.h rt.h rt.lib
See Also

Threads