[issue14277] time.monotonic docstring does not mention the time unit returned
STINNER Victor victor.stin...@gmail.com added the comment: The unit (seconds) is not mentioned in the doc. Related changesets: 27441e0d6a75 and c11946846474. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14277 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14277] time.monotonic docstring does not mention the time unit returned
STINNER Victor victor.stin...@gmail.com added the comment: The unit (seconds) is not mentioned in the doc The unit (seconds) is *now* mentioned in the doc -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14277 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14277] time.monotonic docstring does not mention the time unit returned
New submission from Nicholas Riley com-python-b...@sabi.net: Currently: help(time.monotonic) Help on built-in function monotonic in module time: monotonic(...) monotonic() - float Monotonic clock. The reference point of the returned value is undefined so only the difference of consecutive calls is valid. -- components: Library (Lib) messages: 155518 nosy: nriley priority: normal severity: normal status: open title: time.monotonic docstring does not mention the time unit returned versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14277 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14277] time.monotonic docstring does not mention the time unit returned
STINNER Victor victor.stin...@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 rep...@bugs.python.org http://bugs.python.org/issue14277 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14277] time.monotonic docstring does not mention the time unit returned
Nicholas Riley com-python-b...@sabi.net added the comment: According to http://juliusdavies.ca/posix_clocks/clock_realtime_linux_faq.html, CLOCK_REALTIME can go backwards. CLOCK_MONOTONIC_RAW is best where available (like QueryPerformanceFrequency / mach_absolute_time) and CLOCK_MONOTONIC is pretty good. So I have updated both the docs for time.monotonic and time.wallclock to hopefully better explain things... may need to be another issue here too. -- keywords: +patch Added file: http://bugs.python.org/file24809/monotonic-doc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14277 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com