[issue14277] time.monotonic docstring does not mention the time unit returned
STINNER Victor
report at bugs.python.org
Tue Mar 13 00:36:20 CET 2012
STINNER Victor <victor.stinner at gmail.com> added the comment:
time.monotonic() has 3 implementations:
* Windows: QueryPerformanceCounter() with QueryPerformanceFrequency()
* Mac OS X: mach_absolute_time() with mach_timebase_info()
* UNIX: clock_gettime(CLOCK_MONOTONIC_RAW) or clock_gettime(CLOCK_MONOTONIC)
QueryPerformanceFrequency() returns the frequency "in counts per second" according to the doc.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms644905(v=vs.85).aspx
mach_absolute_time() with mach_timebase_info() returns a number of seconds, but Python uses *1e-9.
clock_gettime() uses a timespec structure and Python uses *1e-9.
It looks like to mention that time.monotonic() unit is seconds.
----------
nosy: +haypo
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14277>
_______________________________________
More information about the Python-bugs-list
mailing list