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/118043.html below:

[Python-Dev] Rename time.steady(strict=True) to time.monotonic()?

[Python-Dev] Rename time.steady(strict=True) to time.monotonic()? [Python-Dev] Rename time.steady(strict=True) to time.monotonic()?Victor Stinner victor.stinner at gmail.com
Sat Mar 24 11:35:43 CET 2012
> Does this mean that there are circumstances where monotonic will work for a
> while, but then fail?

No. time.monotonic() always work or always fail. If monotonic()
failed, steady() doesn't call it again.

> Otherwise, we would only need to check monotonic once, when the time module
> is first loaded, rather than every time it is called. Instead of the above:
>
> # global to the time module
> try:
>    monotonic()
> except (NameError, OSError):
>    steady = time
> else:
>    steady = monotonic

I implemented steady differently to avoid the need of calling
monotonic at Python startup. Calling monotonic at startup would be an
extra useless system call.

Victor
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