From 755f32dcfa9eae1aaaad2b1055dbe8c7e2a0ec84 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 3 Apr 2012 14:00:16 +0200 Subject: [PATCH] PEP 418: Mention CLOCK_*_COARSE and Tools/pybench/systimes.py --- pep-0418.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pep-0418.txt b/pep-0418.txt index ed2b0e421..e3fb2759f 100644 --- a/pep-0418.txt +++ b/pep-0418.txt @@ -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 +`_. + + Functions ^^^^^^^^^