WSH » WScript » Sleep

Syntax:
WScript.Sleep (lngTime)

The Sleep method causes execution of the current script to be suspended for the specified number of milliseconds.

Examples

Code:
for (i=1; i<=5; i++)
{
    WScript.Sleep(1000)
    WScript.Echo("I started",i,"second(s) ago.")
}
WScript.Echo("Now I'm done.")
Output:
I started 1 second(s) ago.
I started 2 second(s) ago.
I started 3 second(s) ago.
I started 4 second(s) ago.
I started 5 second(s) ago.
Now I'm done.
Explanation:

The use of the Sleep method is demonstrated in this JScript code.

Language(s): JavaScript