Python : 改进的模块time
2019-06-19 17:22
1616 查看
PEP 564 向 time 模块增加六个具有纳秒级精度的新函数:
time.clock_gettime_ns() time.clock_settime_ns() time.monotonic_ns() time.perf_counter_ns() time.process_time_ns() time.time_ns()
增加了新的时钟标识符:
time.CLOCK_BOOTTIME (Linux): 与 time.CLOCK_MONOTONIC 相似,不同点在于它还包括任何系统挂起的时间。 time.CLOCK_PROF (FreeBSD, NetBSD 和 OpenBSD): 高精度的分进程 CPU 计时器。 time.CLOCK_UPTIME (FreeBSD, OpenBSD): 该时间的绝对值是系统运行且未挂起的时间,提供准确的正常运行时间度量。
新的 time.thread_time() 和 time.thread_time_ns() 函数可用于获取每线程的 CPU 时间度量。 (由 Antoine Pitrou 在 bpo-32025 中贡献。)
新的 time.pthread_getcpuclockid() 函数会返回特定线程中 CPU 时钟的时钟 ID。
相关文章推荐
- python中time模块转换Unix时间戳
- python time模块详解
- python time模块
- 使用Python的timeit模块
- python模块之time and datetime
- 制作python模块安装包(转)_Time Goes By_百度空间
- python中利用Time模块判断输入年月日为该年第几天
- RUN__IT # Python内置性能分析所用模块 timeit
- 零基础学python-3.6 根据模块结构 改进我们的游戏
- python中使用time模块计算代码执行效率的精度测试
- Python中time模块详解
- 说说Python标准库之time模块的常用方法
- Python3.6之datatime模块
- python中使用time模块计算代码执行效率的精度测试(转)
- Python中time模块详解(转)
- Python datetime 模块之timedelta
- Python中time模块详解
- Python : 改进的模块idlelib 与 IDLE
- python time模块
- python time模块和datetime模块详解