xHarbour Reference Documentation > Function Reference |
Puts a thread to sleep.
ThreadSleep( <nMilliSeconds>, [<lNoCpu>] ) --> NIL
The function returns always NIL.
Function ThreadSleep() is used to suspend the current thread for a defined period of time. This is useful, for example, when a thread should check some status variables periodically and process data only if the status has changed.
If the second parameter is set to .T. (true), the thread ignores <nMilliSeconds> an resumes only after a message is put into the thread's message queue by the operating system.
Note: this function is also available in single threaded applications.
See also: | Inkey(), SecondsSleep(), StartThread(), WAIT |
Category: | Multi-threading functions , xHarbour extensions |
Source: | vm\thread.c |
LIB: | xhbmt.lib |
DLL: | xhbmtdll.dll |
http://www.xHarbour.com