Sleep Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Suspends the current thread for a specified time.

Namespace:  System.Threading
Assembly:  mscorlib (in mscorlib.dll)

public static void Sleep(
	int millisecondsTimeout
)

Parameters

millisecondsTimeout
Type: System..::..Int32
The number of milliseconds for which the thread is blocked. Specify zero (0) to indicate that this thread should be suspended to allow other waiting threads to execute. Specify Infinite to block the thread indefinitely.

The thread will not be scheduled for execution by the operating system for the amount of time specified. This method changes the state of the thread to include WaitSleepJoin.

This method does not perform standard COM and SendMessage pumping.

Show: