【发布时间】:2021-03-19 12:22:42
【问题描述】:
在 Python 3.7 中,time_ns() 以纳秒为单位提供纪元时间戳。在 3.6.9 中如何获得?
当我使用time() 时,它给了我几秒钟的时间。
【问题讨论】:
-
这应该可以用简单的数学来解决。
-
也许这会对你有所帮助:stackoverflow.com/questions/2394485/…
-
time()返回一个浮点数,因此它比秒精确得多。你只需要乘以它。
标签: python timestamp python-3.6 epoch