SleepEx

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

Syntax

Copy
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

If the specified time interval expired, it returns a 0 (zero).

Requirements

Minimum supported version Header Library

eRTOS 1.0 SDK

windows.h rtkrnl.lib

See Also: