PEP 418: Mention CLOCK_*_COARSE and Tools/pybench/systimes.py

This commit is contained in:
Victor Stinner 2012-04-03 14:00:16 +02:00
parent a1126cf458
commit 755f32dcfa
1 changed files with 16 additions and 0 deletions

View File

@ -383,6 +383,12 @@ Linux.
clock_gettime() requires to link the program against the rt
(real-time) library.
.. note::
Linux provides also CLOCK_MONOTONIC_COARSE since Linux 2.6.32 which has less
accurate than CLOCK_MONOTONIC but is faster.
Windows: QueryPerformanceCounter
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -554,6 +560,11 @@ For CLOCK_REALTIME, the accuracy of this table is the result of clock_getres().
It looks like Linux does not implement clock_getres() and always return 1
nanosecond.
.. note::
Linux provides also CLOCK_REALTIME_COARSE since Linux 2.6.32 which has less
accurate than CLOCK_REALTIME but is faster.
Windows: GetSystemTimeAsFileTime
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -621,6 +632,11 @@ clock_getres(). It looks like Linux does not implement clock_getres() and
always return 1 nanosecond. For GetProcessTimes(), the accuracy is read using
GetSystemTimeAdjustment().
Python source code includes a portable library to get the process time:
`Tools/pybench/systimes.py
<http://hg.python.org/cpython/file/tip/Tools/pybench/systimes.py>`_.
Functions
^^^^^^^^^