Function
Sleep
Description
Pauses execution of the current thread for a specified interval. Interval passed is in milliseconds. In-proc COM servers, this function should be used instead of UI functions like WAIT or INKEY().
A thread can also relinquish the remainder of its time slice by calling this function with a sleep time of zero milliseconds.
Host file
Kernel32.dll
Category
Base services
Declare in Visual FoxPro
DECLARE Sleep IN Win32API INTEGER nMilliseconds
Declare in Visual C++
VOID Sleep(
DWORD dwMilliseconds // sleep time
);
Example in Visual FoxPro
* Pause for 5 seconds
nSleepSeconds = 5
nMilliseconds = nSleepSeconds * 1000
=Sleep(nMilliSeconds)