[Python-Dev] Drop the new time.wallclock() function?
Andrew Svetlov
andrew.svetlov at gmail.com
Wed Mar 14 02:12:32 CET 2012
On Tue, Mar 13, 2012 at 5:29 PM, Victor Stinner
<victor.stinner at gmail.com> wrote:
> I suppose that you can use a manual fallback to time.time() if
> time.monotonic() failed. If time.monotonic() fails, it fails directly at the
> first call. Example of a fallback working with Python < 3.3:
>
> try:
> time.monotonic()
> except (OSError, AttributeError):
> get_time = time.time
> else:
> get_time = time.monotonic
>
I like 'fallback' solution while `get_time` is not the best name for
high precision timer from my perspective.
Can you call it `monotonic` or `realtime`?
More information about the Python-Dev
mailing list