Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] PEP 410 (Decimal timestamp): the implementation is ready for a review

Guido van Rossumguido at python.org
Wed Feb 15 17:39:45 CET 2012


I just came to this thread. Having read the good arguments on bothsides, I keep wondering why anybody would care about nanosecondprecision in timestamps. Unless you're in charge of managing one ofthe few atomic reference clocks in the world, your clock is not goingto tell time that accurate. (Hey, we don't even admit the existence ofleap seconds in most places -- not that I mind. :-)What purpose is there to recording timestamps in nanoseconds? Forclocks that start when the process starts running, float *is*(basically) good enough. For measuring e.g. file access times, thereis no way that the actual time is know with anything like thatprecision (even if it is *recorded* as a number of milliseconds --that's a different issue).Maybe it's okay to wait a few years on this, until either 128-bitfloats are more common or cDecimal becomes the default floating pointtype? In the mean time for clock freaks we can have a few specializedAPIs that return times in nanoseconds as a (long) integer.-- --Guido van Rossum (python.org/~guido)


More information about the Python-Devmailing list

[8]ページ先頭

©2009-2025 Movatter.jp