我看不到 date
的选项
/proc/uptime
是基于引导的,而不是单调的。
最后我找到了cat/proc/timer_list | grep now
产生的纳秒数是通过 ktime_get
获得的,如果我理解正确的话,它会返回单调时间,但这非常麻烦。
update:返回值必须与clock_gettime
最佳答案
看起来它在 python 3.3 中可用:http://www.python.org/dev/peps/pep-0418/
否则,您可以编写一个小的 C 程序来调用 clock_gettime
:http://linux.die.net/man/3/clock_gettime
关于linux - 你如何在 shell 中获取 clock_gettime(2) 时钟?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18490494/