我在写包含几个亚行的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