Thread.Sleep Method

Suspends the current thread for a specified amount of time.

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

Syntax

[MethodImplAttribute]
public static void Sleep (
         intmillisecondsTimeout
)

Parameters

  • millisecondsTimeout
    The number of milliseconds for which the current thread is to be blocked, or suspended. Specify 0 (zero) to indicate that this thread should be suspended so that other waiting threads can execute. Specify infinite to suspend the thread indefinitely.

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, and 4.1.

See Also

Reference

Thread Class
Thread Members
System.Threading Namespace