[Python-Dev] PEP 564: Add new time functions with nanosecond resolution

Victor Stinner victor.stinner at gmail.com
Thu Nov 2 11:16:22 EDT 2017


Thank you Guido for your review and approval.

I just implemented the PEP 564 and so changed the PEP status to Final.

FYI I also added 3 new clock identifiers to the time module in Python
3.7: CLOCK_BOOTTIME, CLOCK_PROF and CLOCK_UPTIME.

So you can now get your Linux uptime with a resolution of 1 nanosecond :-D

haypo at selma$ ./python -c 'import time;
print(time.clock_gettime_ns(time.CLOCK_BOOTTIME))'
232172588663888

Don't do that at home, it's just for educational purpose only! ;-)

Victor

2017-10-30 18:18 GMT+01:00 Guido van Rossum <guido at python.org>:
> I have read PEP 564 and (mostly) followed the discussion in this thread, and
> I am happy with the PEP. I am hereby approving PEP 564. Congratulations
> Victor!
> --
> --Guido van Rossum (python.org/~guido)


More information about the Python-Dev mailing list