[Python-Dev] (time) PEP 418 glossary V2

Victor Stinner victor.stinner at gmail.com
Tue Apr 24 12:47:27 CEST 2012

> Precision
> ---------
> This is another tricky term,

This is a good reason why it is no more used in the PEP :-)

> Note that "precision" as reported by the clock itself may use yet
> another definition, and may differ between clocks.

Some C function provides the frequency of the clock (and so its
resolution), or directly the resolution, but I don't know any function
providing the precision.

I thought that clock_getres() is the precision, but I was wrong.
clock_getres() is really the resolution announced by the OS, even if
the OS may be pessimistic (and so wrong, ex: OpenBSD and Solaris). But
Python should not try to workaround OS "bugs".


More information about the Python-Dev mailing list