DosSleep

DosSleep causes the calling thread to be suspended for a given time.

Syntax
rc = DosSleep( ulInterval );


 * DosSleep(ulInterval) : Current thread sleeps for n milliseconds.

Parameters

 * ulInterval - ULONG - input : Time in milliseconds. The time that the calling thread will sleep. In milliseconds.

Returns
APIRET with values of:
 * NO_ERROR
 * ERROR_TS_WAKEUP

Define (C/C++)
INCL_DOSPROCESS

Calling conversion
Cdecl32

Sample Code
APIRET rc; rc=DosSleep(2000); /* Suspend the thread for 2 seconds */
 * 1) define INCL_DOSDATETIME
 * 2) include 

Gotchas
Calling DosSleep with 0 as the argument will give up the rest of the threads current time-slice. The time to sleep will be rounded up by the system to the next clock tick. Note that this does not seem to work on many systems, so DosSleep(1) is safer.

OS Version Introduced

 * OS/2 1.0