红联Linux门户
Linux帮助

Android sh终端下time命令(time在linux下统计程序运行时间)

发布时间:2016-07-29 09:54:21来源:linux网站作者:ngyzqf
time是linux下的命令,可以用来统计一个程序运行的时间,包括user time 和 sys time和 总的时间 real  time。
 
在linux终端输入type time会有如下提示:
uiprj@apssui-sha-025:~/code/qual20160104$ type time
time is a shell keyword
 
adb shell进到终端执行:
shell@msm8909:/ $ type time
time is a reserved word
 
Android 6.0(m版本) 这个命令的源码位置:
Android代码目录:
模块:
/external/mksh
文件:
/external/mksh/src/funcs.c
函数:
int timex(struct op *t, int f, volatile int *xerrok)
 
本文永久更新地址:http://www.linuxdiyf.com/linux/22810.html