http://developer.android.com/reference/android/os/SystemClock.html
与Thread.sleep不同的是,他不会抛出interruptedException;
static void |
sleep(long ms)
Waits a given number of milliseconds (of uptimeMillis) before returning.
|
public static void sleep (long ms)
Added in
API level 1
Waits a given number of milliseconds (of uptimeMillis) before returning. Similar to sleep(long)
, but does not throw InterruptedException
; interrupt()
events are deferred until the next interruptible operation. Does not return until at least the specified number of milliseconds has elapsed.
Parameters
ms | to sleep before returning, in milliseconds of uptime. |
---|