time.clock has been deprecated in Python 3.3 and will be removed from Python 3.8: use time.perf_counter or time.process_time instead clock()
time.clock 在 3.3已经废弃,将在3.8移除,使用time.perf_counter or time.process_time代替clock()
time.perf_counter用法
import time
time.perf_counter()
【t0=time.perf_counter()
t1=time.perf_counter()
long=t1-t0】
返回时间
获取两次时间点,可进行相减获取程序运行时间。
原文:https://www.cnblogs.com/xinqian/p/11218622.html