Previous Topic

Next Topic

ctThrdSleep

Sleep a thread for a given time.

Short Name

ctThrdSleep()

Type

Threading function

Declaration

NINT ctThrdSleep(LONG milliseconds) 

Description

Sleep thread for specified milliseconds, 1000 milliseconds equivalent to 1 second. A sleep of zero duration acts as a yield to other threads.

Return

ctThrdSleep() returns NO_ERROR. See “c-tree Plus Error Codes” in the c-tree Plus Programmer’s Reference Guide for a complete listing of valid c-tree Plus error values.

Example

See ctmtex.c and ctmtap.c for ctThrdSleep() examples.

Limitations

Can only be used with a ctThrd library.

See also

ctThrdInit()