Android SystemClock
16lz
2021-01-23
import android.os.SystemClock;
Android官方文档:
public static long elapsedRealtime ()
Returns milliseconds since boot, including time spent in sleep.
返回Android系统启动至今的时间。
public static void sleep (long ms)
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.
与Java Thread.sleep(long ms)基本相似,但是Android的SystemClock忽略InterruptedException。
更多相关文章
- Android7.0中文文档(API)-- RemoteViews
- android > TimePicker 时间设置控件
- Android API中文文档(111) —— MailTo
- Android 3.1 r1 中文API文档 (120) —— SearchView
- Android 3.0 r1 API中文文档(107) —— AsyncPlayer
- Android 开发指南文档的部分中文翻译
- Android API中文文档系列Manifest