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

Victor Stinner victor.stinner at gmail.com
Tue Oct 24 07:20:53 EDT 2017


2017-10-24 11:22 GMT+02:00 Antoine Pitrou <solipsis at pitrou.net>:
> What does synchronization have to do with it?  If synchronization
> matters, then your PEP should be rejected, because current computers
> using NTP can't synchronize with a better precision than 230 ns.

Currently, the PEP 564 is mostly designed for handling time on the
same computer. Better resolution inside the same process, and
"synchronization" between two processes running on the same host:
https://www.python.org/dev/peps/pep-0564/#issues-caused-by-precision-loss

Maybe tomorrow, time.time_ns() will help for use cases with more computers :-)


> See https://blog.cloudflare.com/how-to-achieve-low-latency/

This article doesn't mention NTP, synchronization or nanoseconds.
Where did you see "230 ns" for NTP?

Victor


More information about the Python-Dev mailing list