Android(安卓)SystemClock
16lz
2021-12-04
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。
更多相关文章
- android的ExpandableListView
- android获取内部外部存储空间
- Android7.0中文文档(API)-- RemoteViews
- Android(安卓)创建与解析XML(六)—— 比较与使用
- Android服务器搭建——Jsp+Servlet,返回Json到Android客户端
- Android(安卓)创建与解析XML(六)—— 比较与使用
- Android(安卓)创建与解析XML(六)—— 比较与使用
- Android(安卓)创建与解析XML(六)—— 比较与使用
- Android(安卓)API中文文档系列Manifest