[Python-checkins] peps: PEP 418: Explain why Linux always announces a resolution of 1 nanosecond,

victor.stinner python-checkins at python.org
Thu Apr 26 23:35:53 CEST 2012


http://hg.python.org/peps/rev/143c015f85e5
changeset:   4313:143c015f85e5
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Thu Apr 26 23:35:48 2012 +0200
summary:
  PEP 418: Explain why Linux always announces a resolution of 1 nanosecond,
even if the hardware has a lower resolution

files:
  pep-0418.txt |  6 ++++++
  1 files changed, 6 insertions(+), 0 deletions(-)


diff --git a/pep-0418.txt b/pep-0418.txt
--- a/pep-0418.txt
+++ b/pep-0418.txt
@@ -772,6 +772,12 @@
 architectures.  They are at least provided on x86/x86_64, ARM and
 PowerPC.
 
+clock_getres() returns 1 nanosecond for ``CLOCK_REALTIME`` and
+``CLOCK_MONOTONIC`` regardless of underlying clock source.  Read `Re:
+clock_getres() and real resolution
+<http://lkml.org/lkml/2012/2/9/100>`_ from Thomas Gleixner (9 Feb
+2012) for an explanation.
+
 The ``/sys/devices/system/clocksource/clocksource0`` directory
 contains two useful files:
 

-- 
Repository URL: http://hg.python.org/peps


More information about the Python-checkins mailing list