Thread.Sleep Thread.Sleep Method

Definition

Overloads

Sleep(Int64) Sleep(Int64)

Causes the thread which sent this message to sleep for the given interval of time (given in milliseconds).

Sleep(Int64, Int32) Sleep(Int64, Int32)

Causes the thread which sent this message to sleep for the given interval of time (given in milliseconds and nanoseconds).

Sleep(Int64) Sleep(Int64)

Causes the thread which sent this message to sleep for the given interval of time (given in milliseconds).

[Android.Runtime.Register("sleep", "(J)V", "")]
public static void Sleep (long millis);
static member Sleep : int64 -> unit

Parameters

millis
Int64 Int64

Exceptions

if the current thread has been interrupted. The interrupted status of the current thread will be cleared before the exception is thrown.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

See also

Sleep(Int64, Int32) Sleep(Int64, Int32)

Causes the thread which sent this message to sleep for the given interval of time (given in milliseconds and nanoseconds).

[Android.Runtime.Register("sleep", "(JI)V", "")]
public static void Sleep (long millis, int nanos);
static member Sleep : int64 * int -> unit

Parameters

millis
Int64 Int64

The time to sleep in milliseconds.

nanos
Int32 Int32

Extra nanosecond precision

Exceptions

if the current thread has been interrupted. The interrupted status of the current thread will be cleared before the exception is thrown.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

See also

Applies to