A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-March/117641.html below:

[Python-Dev] Drop the new time.wallclock() function?

[Python-Dev] Drop the new time.wallclock() function?Kristján Valur Jónsson kristjan at ccpgames.com
Wed Mar 14 18:09:39 CET 2012
> - By default, it should fall back to time.time if a better source is
>  not available, but there should be a flag that can disable this
>  fallback for users who really *need* a monotonic/steady time source.
As pointed out on a different thread, you don"t need this "flag" since the code can easily enforce the monotonic property by maintaining a static value.
This is how we worked around buggy implementations of QueryPerformanceCounter on windows ().
K


-----Original Message-----
From: python-dev-bounces+kristjan=ccpgames.com at python.org [mailto:python-dev-bounces+kristjan=ccpgames.com at python.org] On Behalf Of Nadeem Vawda
Sent: 14. mars 2012 09:47
To: Guido van Rossum
Cc: Antoine Pitrou; python-dev at python.org
Subject: Re: [Python-Dev] Drop the new time.wallclock() function?

A summary of the discussion so far, as I've understood it:

- We should have *one* monotonic/steady timer function, using the
  sources described in Victor's original post.

- By default, it should fall back to time.time if a better source is
  not available, but there should be a flag that can disable this
  fallback for users who really *need* a monotonic/steady time source.

- Proposed names for the function:
  * monotonic
  * steady_clock
  * wallclock
  * realtime

- Proposed names for the flag controlling fallback behavior:
  * strict (=False)
  * fallback (=True)
  * monotonic (=False)


For the function name, I think monotonic() and steady_clock() convey the purpose of the function much better than the other two; the term "wallclock" is actively misleading, and "realtime" seems ambiguous.

For the flag name, I'm -1 on "monotonic" -- it sounds like a flag to decide whether to use a monotonic time source always or never, while it actually decides between "always" and "sometimes". I think "strict"
is nicer than "fallback", but I'm fine with either one.

Cheers,
Nadeem
_______________________________________________
Python-Dev mailing list
Python-Dev at python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/kristjan%40ccpgames.com


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4