python time库有哪些时钟
时钟说明
1、monotonic测量长时间运行过程需要时间。
因为即使系统时间发生变化,也能保证钟不会逆转。
2、perf_counter允许访问最高可用分辨率的时钟。
使短时间测量更加正确。
3、process_time返回处理器时间和系统时间的组合结果。
4、time回到纪元以来的秒数。
UNIX系统从1970年1月1日00:00开始计算。
实例
importtime print(time.monotonic()) print(time.monotonic_ns()) print(time.perf_counter()) print(time.perf_counter_ns()) print(time.process_time()) print(time.process_time_ns()) print(time.time()) print(time.time_ns())
以上就是python time库时钟的介绍,希望对大家有所帮助。更多python学习指路:python基础教程
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。