Freigeben über


SystemClock.Sleep(Int64) Method

Definition

Waits a given number of milliseconds (of uptimeMillis) before returning.

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

Parameters

ms
Int64

to sleep before returning, in milliseconds of uptime.

Attributes

Remarks

Waits a given number of milliseconds (of uptimeMillis) before returning. Similar to java.lang.Thread#sleep(long), but does not throw InterruptedException; Thread#interrupt() events are deferred until the next interruptible operation. Does not return until at least the specified number of milliseconds has elapsed.

Java documentation for android.os.SystemClock.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