SleepEx

SleepEx suspends the current thread until the specified condition is met.

Syntax

DWORD SleepEx(
   DWORD dwMilliseconds,
   BOOL bAlertable
);

Parameters

dwMilliseconds

The time interval for which execution is to be suspended, in milliseconds.

A value of zero causes the thread to relinquish the remainder of its time slice to any other thread of equal priority that is ready to run. If there are no other threads of equal priority ready to run, the function returns immediately, and the thread continues execution.

bAlertable

This parameter is ignored. This function does not return until the sleep period specified in parameter dwMilliseconds has elapsed.

Return Value

The return value is zero if the specified time interval expired.

Requirements

Minimum Supported Version RTX64 2013
Header windows.h
Library Rtx_Rtss.lib

See Also:

RtCreateTimer

RtDeleteTimer

RtGetClockResolution

RtGetClockTime

RtGetClockTimerPeriod

RtGetTimer

RtSetClockTime

RtSetTimer

RtSetTimerRelative