PEP 418: Explain why Linux always announces a resolution of 1 nanosecond,

even if the hardware has a lower resolution
This commit is contained in:
Victor Stinner 2012-04-26 23:35:48 +02:00
parent 5e7ed448e8
commit bca0b715a5
1 changed files with 6 additions and 0 deletions

View File

@ -772,6 +772,12 @@ High-resolution timers are not supported on all hardware
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: