next up previous contents
Next: 5.9 WD_License() Up: 5. General WD_xxx Functions Previous: 5.7 WD_DebugDump()   Contents


5.8 WD_Sleep()


PURPOSE

$\bullet$Delays execution for a specific duration of time.


PROTOTYPE

DWORD WD_Sleep(
    HANDLE hWD,
    WD_SLEEP *pSleep);


PARAMETERS

Name Type Input/Output
$\bullet$hWD HANDLE Input
$\bullet$pSleep WD_SLEEP*  
$\gg$dwMicroSeconds DWORD Input
$\gg$dwOptions DWORD Input


DESCRIPTION

Name Description
hWD Handle to WinDriver's kernel-mode driver as received from WD_Open() [5.2]
pSleep Pointer to a sleep information structure:
$\bullet$ dwMicroSeconds Sleep time in microseconds - 1/1,000,000 of a second.
$\bullet$ dwOptions A bit-mask, which can be set to either of the following:
$\bullet$Zero (0) - Busy sleep (default)
OR:
$\bullet$SLEEP_NON_BUSY - Delay execution without consuming CPU resources. (Not relevant for under 17,000 micro seconds. Less accurate than busy sleep).


RETURN VALUE

Returns WD_STATUS_SUCCESS (0) on success, or an appropriate error code otherwise [A].


REMARKS


EXAMPLE

WD_Sleep slp;

BZERO(slp);
slp.dwMicroSeconds = 200;
WD_Sleep(hWD, &slp);