[Python-Dev] datetime nanosecond support (ctd?)
Marko Rauhamaa
marko at pacujo.net
Thu Dec 11 20:59:28 CET 2014
Ethan Furman <ethan at stoneleaf.us>:
> On 12/11/2014 11:14 AM, Guido van Rossum wrote:
>> (I wouldn't be surprised if there wasn't -- while computer clocks
>> have a precision in nanoseconds, that doesn't mean they are that
>> *accurate* at all (even with ntpd running).
>
> The real-world use cases deal with getting this information from other
> devices (network cards, GPS, particle accelerators, etc.), so it's not
> really a matter of cross-computer accurancy, but relative accuracy
> (i.e. how long did something take?).
It would be nice if it were possible to deal with high-precision epoch
times and time deltas without special tricks. I have had to deal with
femtosecond-precision IRL (albeit in a realtime C application, not in
Python). Quad-precision floats (<URL:
http://en.wikipedia.org/wiki/Quadruple-precision_floating-point_format>)
would do it for Python:
* just do it in seconds
* have enough precision for any needs
* have enough renge for any needs
Marko
More information about the Python-Dev
mailing list