首页 > 其他 > 详细

time.per_counter

时间:2019-07-20 18:22:12      阅读:97      评论:0      收藏:0      [点我收藏+]

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】

返回时间

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

time.per_counter

原文:https://www.cnblogs.com/xinqian/p/11218622.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!