Python time库

1.调用系统当前时间 perf_counter()

import time as t
start = t.perf_counter()
end = t.perf_counter()
tim=end-start
print('运行这段代码用时:{:.6f}'.format(tim)

 2.系统暂停

time.sleep(0.1)

转载仅为学习,不会商用。
欢迎转载原创,附文链接。
原文地址:https://www.cnblogs.com/xdd1997/p/11707715.html