[issue14555] clock_gettime/settime/getres: Add more clock identifiers

STINNER Victor report at bugs.python.org
Thu Apr 12 00:30:46 CEST 2012


STINNER Victor <victor.stinner at gmail.com> added the comment:

Extract of FreeBSD manpage of clock_gettime:

     The clock_id argument can be one of the following values: CLOCK_REALTIME,
     CLOCK_REALTIME_PRECISE, CLOCK_REALTIME_FAST for time that increments as a
     wall clock should; CLOCK_MONOTONIC, CLOCK_MONOTONIC_PRECISE,
     CLOCK_MONOTONIC_FAST which increments in SI seconds; CLOCK_UPTIME,
     CLOCK_UPTIME_PRECISE, CLOCK_UPTIME_FAST which starts at zero when the
     kernel boots and increments monotonically in SI seconds while the machine
     is running; CLOCK_VIRTUAL for time that increments only when the CPU is
     running in user mode on behalf of the calling process; CLOCK_PROF for
     time that increments when the CPU is running in user or kernel mode; or
     CLOCK_SECOND which returns the current second without performing a full
     time counter query, using in-kernel cached value of current second.

     The clock IDs CLOCK_REALTIME_FAST, CLOCK_MONOTONIC_FAST,
     CLOCK_UPTIME_FAST are analogs of corresponding IDs without _FAST suffix
     but do not perform a full time counter query, so their accuracy is one
     timer tick.  Similarly, CLOCK_REALTIME_PRECISE, CLOCK_MONOTONIC_PRECISE,
     CLOCK_UPTIME_PRECISE are used to get the most exact value as possible, at
     the expense of execution time.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14555>
_______________________________________


More information about the Python-bugs-list mailing list