Dela via


TimeUnit.Sleep(Int64) Method

Definition

Performs a Thread#sleep(long, int) Thread.sleep using this time unit.

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

Parameters

timeout
Int64

the minimum time to sleep. If less than or equal to zero, do not sleep at all.

Attributes

Exceptions

if interrupted while sleeping

Remarks

Performs a Thread#sleep(long, int) Thread.sleep using this time unit. This is a convenience method that converts time arguments into the form required by the Thread.sleep method.

Java documentation for java.util.concurrent.TimeUnit.sleep(long).

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.

Applies to