The Sleep function suspends the execution of the current thread for a specified interval.
VOID Sleep(
DWORD dwMilliseconds |
// sleep time in milliseconds |
); |
This function does not return a value.
A thread can relinquish the remainder of its time slice by calling this function with a sleep time of zero milliseconds.
You have to be careful when using Sleep and code that directly or indirectly creates windows. If a thread creates any windows, it must process messages. Message broadcasts are sent to all windows in the system. If you have a thread that uses Sleep with infinite delay, the system will deadlock. Two examples of code that indirectly creates windows are DDE and COM CoInitialize. Therefore, if you have a thread that creates windows, use MsgWaitForMultipleObjects or MsgWaitForMultipleObjectsEx, rather than Sleep.
Sleep.
MsgWaitForMultipleObjects, MsgWaitForMultipleObjectsEx, SleepEx
file: /Techref/os/win/api/win32/func/src/f85_17.htm, 2KB, , updated: 2000/4/7 11:19, local time: 2024/11/5 17:18,
18.222.166.151:LOG IN ©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://massmind.org/techref/os/win/api/win32/func/src/f85_17.htm"> Sleep</A> |
Did you find what you needed? |
Welcome to massmind.org! |
Welcome to massmind.org! |
.