[issue31784] Add time.time_ns(): get time with nanosecond resolution

2017-10-13 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +3965 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue31784] Add time.time_ns(): get time with nanosecond resolution

2017-10-13 Thread STINNER Victor
New submission from STINNER Victor : time.time() returns time as a float, but the conversion to float lose precision at the nanosecond resolution. I propose to add a new time.time_ns() function which returns time as an integer number of nanoseconds since epoch. It's similar to the st_mtime_ns