[Python-ideas] Add time.time_ns(): system clock with nanosecond resolution

francismb francismb at email.de
Fri Oct 20 12:36:15 EDT 2017


Hi Victor,

On 10/13/2017 04:12 PM, Victor Stinner wrote:
> I would like to add:
> 
> * time.time_ns()
> * time.monotonic_ns()
> * time.perf_counter_ns()
> * time.clock_gettime_ns()
> * time.clock_settime_ns()
due nano vs. pico vs. ...

why not something like (please change '_in' for what you like):

time.time_in(precision)
time.monotonic_in(precision)


where precision is an enumeration for 'nano',
'pico' ...

Thanks in advance!
--francis


More information about the Python-ideas mailing list