[Python-Dev] PEP 564: Add new time functions with nanosecond resolution
solipsis at pitrou.net
Mon Oct 16 11:42:09 EDT 2017
On Mon, 16 Oct 2017 17:23:15 +0200
Victor Stinner <victor.stinner at gmail.com> wrote:
> 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.clock_gettime_ns(clock_id)``
> >> * ``time.clock_settime_ns(clock_id, time: int)``
> >> * ``time.perf_counter_ns()``
> >> * ``time.monotonic_ns()``
> >> * ``time.time_ns()``
> > Why not ``time.process_time_ns()``?
> 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
> If we add process_time_ns(), should we also add nanosecond resolution
> to other functions related to process or CPU time?
Restricting this PEP to the time module would be fine with me.
More information about the Python-Dev