不是cpu时间,而是现实世界时间。
这就是我现在所做的。
date
my_task
date
但这需要密切关注屏幕全部5分钟。应该有更好的方法。
我正在使用mac。
答案 0 :(得分:4)
使用时间命令:
time my_task
答案 1 :(得分:0)
我很幸运地转而使用zsh并使用它:
http://blog.tobez.org/2009/03/how-to-time-command-execution-in-zsh.html
(请注意评论中对REPORTTIME的引用。)