[Python-checkins] peps: PEP 418: Mention CLOCK_*_COARSE and Tools/pybench/systimes.py
victor.stinner
python-checkins at python.org
Tue Apr 3 14:00:18 CEST 2012
http://hg.python.org/peps/rev/9a455a87ffac
changeset: 4193:9a455a87ffac
user: Victor Stinner <vstinner at wyplay.com>
date: Tue Apr 03 14:00:16 2012 +0200
summary:
PEP 418: Mention CLOCK_*_COARSE and Tools/pybench/systimes.py
files:
pep-0418.txt | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/pep-0418.txt b/pep-0418.txt
--- a/pep-0418.txt
+++ b/pep-0418.txt
@@ -383,6 +383,12 @@
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 @@
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 @@
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
^^^^^^^^^
--
Repository URL: http://hg.python.org/peps
More information about the Python-checkins
mailing list