[英]AttributeError: module 'time' has no attribute 'clock' chatterbot
[英]AttributeError: not found module 'time' has no attribute 'clock'
Traceback (most recent call last):
File "D:\Mata Kuliah\Semester VI\Bahan Sistem Tersebar\concurrent_futures_pooling.py", line 20, in <module>
start_time = time.clock()
AttributeError: module 'time' has no attribute 'clock'
time
内置模块在 Python 3.8 中确实没有clock()
导出。
您需要调整您的(显然是 Python 2 或 3.x(其中 x < 8)兼容)代码以与 Python 3.8 兼容。
time.clock()
通常用于高分辨率“秒表”计时。 Python 3.3+ 中的替换是time.perf_counter()
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.