[New-bugs-announce] [issue14104] Implement time.monotonic() on Mac OS X
STINNER Victor
report at bugs.python.org
Fri Feb 24 00:09:15 CET 2012
New submission from STINNER Victor <victor.stinner at gmail.com>:
time.monotonic() can use mach_absolute_time() on Mac OS X. mach_timebase_info() may be used to convert the result to a number of seconds. Examples:
https://github.com/ThomasHabets/monotonic_clock/blob/master/src/monotonic_mach.c
http://svn.boost.org/svn/boost/trunk/boost/chrono/detail/inlined/mac/chrono.hpp
(search steady_clock)
Another way is to use clock_get_time() with host_get_clock_service(SYSTEM_CLOCK). Example:
https://github.com/gavinbeatty/python-monotonic-time/blob/master/darwin.c
----------
components: Library (Lib)
messages: 154095
nosy: haypo, pitrou
priority: normal
severity: normal
status: open
title: Implement time.monotonic() on Mac OS X
versions: Python 3.3
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14104>
_______________________________________
More information about the New-bugs-announce
mailing list