如何以毫秒或纳秒为单位获取当前系统时间? [英] How can I get the current system time in milliseconds or nanosec?
本文介绍了如何以毫秒或纳秒为单位获取当前系统时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Unix.time()
返回秒.
如何获得以毫秒或纳秒为单位的时间?
How can I get the time in ms or ns?
谢谢
推荐答案
Try Unix.gettimeofday
# Unix.time ();;
- : float = 1447865942.
# Unix.gettimeofday();;
- : float = 1447865947.56802297
这篇关于如何以毫秒或纳秒为单位获取当前系统时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文