📅  最后修改于: 2022-03-11 14:46:40.303000             🧑  作者: Mango
from time import perf_counter as timer
import time
from ctypes import windll #new
timeBeginPeriod = windll.winmm.timeBeginPeriod #new
timeBeginPeriod(1) #new
start = timer()
for i in range(1000):
print (i)
time.sleep(0.001)
end = timer()
print ("Total time: ", end - start)