【发布时间】:2015-01-12 15:56:12
【问题描述】:
我拥有的timeit 源(python 2.7)有
if sys.platform == "win32":
# On Windows, the best timer is time.clock()
default_timer = time.clock
else:
# On most other platforms the best timer is time.time()
default_timer = time.time
然而文档表明所有 Windows 机器的行为都相同
默认定时器功能的不同是因为在 Windows 上, clock() 的粒度是微秒,但 time() 的粒度是 1/60 一秒钟……
在 64 位 Windows 上会发生什么? time.time 在 64 位 Windows 上真的更好吗?
【问题讨论】:
标签: python windows time 64-bit