time.per_counter

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】

返回时间

 获取两次时间点,可进行相减获取程序运行时间。

posted @ 2019-07-20 18:05  大数据萌新  阅读(654)  评论(0编辑  收藏  举报