gpt4 book ai didi

Android 检查设备自上次重启以来的运行时间

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:55:25 25 4
gpt4 key购买 nike

我想知道有没有办法获取设备自上次重启以来一直运行的时间?

最佳答案

发件人:http://developer.android.com/reference/android/os/SystemClock.html

SystemClock.elapsedRealtime()

elapsedRealtime() and elapsedRealtimeNanos() return the time since the system was booted, and include deep sleep. This clock is guaranteed to be monotonic, and continues to tick even when the CPU is in power saving modes, so is the recommend basis for general purpose interval timing.

关于Android 检查设备自上次重启以来的运行时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21214014/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com