[Python-Dev] PEP 564: Add new time functions with nanosecond resolution (original) (raw)
Victor Stinner victor.stinner at gmail.com
Mon Oct 16 11:23:15 EDT 2017
- Previous message (by thread): [Python-Dev] PEP 564: Add new time functions with nanosecond resolution
- Next message (by thread): [Python-Dev] PEP 564: Add new time functions with nanosecond resolution
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
2017-10-16 17:06 GMT+02:00 Antoine Pitrou <solipsis at pitrou.net>:
This PEP adds five new functions to the
time
module:*
time.clockgettimens(clockid)
*time.clocksettimens(clockid, time: int)
*time.perfcounterns()
*time.monotonicns()
*time.timens()
Why nottime.processtimens()
?
I only wrote my first email on python-ideas to ask this question, but I got no answer on this question, only proposal of other solutions to get time with nanosecond resolution. So I picked the simplest option: start simple, only add new clocks, and maybe add more "_ns" functions later.
If we add process_time_ns(), should we also add nanosecond resolution to other functions related to process or CPU time?
Add "ru_utime_ns" and "ru_stime_ns" to the resource.struct_rusage used by os.wait3(), os.wait4() and resource.getrusage()
For os.times(): add os.times_ns()? For this one, I prefer to add a new function rather than duplicating all fields of os.times_result, since all fields store durations
Victor
- Previous message (by thread): [Python-Dev] PEP 564: Add new time functions with nanosecond resolution
- Next message (by thread): [Python-Dev] PEP 564: Add new time functions with nanosecond resolution
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]