如何获得Android系统的正常运行时间,并实时命令行? [英] How to get Android system uptime and realtime from command line?
本文介绍了如何获得Android系统的正常运行时间,并实时命令行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在写包含几个亚行的shell命令的脚本。我也想要录制的时候,程序实时和正常运行时间的一种形式执行这些命令。我知道我可以通过SystemClock正常运行时间和实时的:
I'm writing a script containing several "adb shell" command. I also want to record the time when program execute these command in a form of realtime and uptime. I know I can get uptime and realtime through SystemClock:
SystemClock.uptimeMillis();
SystemClock.elapsedRealtime();
有没有什么办法可以在命令行中,这些信息?
Is there any way I can get these information from the command line?
非常感谢!
推荐答案
尝试:
adb shell cat /proc/uptime
这篇关于如何获得Android系统的正常运行时间,并实时命令行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文