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/118097.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()?Janzert janzert at janzert.com
Sun Mar 25 21:48:34 CEST 2012
On 3/24/2012 6:37 AM, Victor Stinner wrote:
>>> - time.monotonic(): monotonic clock, its speed may or may not be
>>> adjusted by NTP but it only goes forward, may raise an OSError
>>> - time.steady(): monotonic clock or the realtime clock, depending on
>>> what is available on the platform (use monotonic in priority). may be
>>> adjusted by NTP or the system administrator, may go backward.
>>>
>>
>> I am surprised that a clock with the name time.steady() has a looser
>> definition than one called time.monotonic(). To my mind a steady clock is by
>> definition monotonic but a monotonic one may or may not be steady.
>
> Do you suggest another name?
>
> Victor

I can't think of a word or short phrase that adequately describes that 
behavior, no. But that may just be because I also don't see any use case 
for it either.

To me the more useful function would be one that used the OS monotonic 
clock when available and failing that used the realtime clock but cached 
the previous returned value and ensured that all values returned obeyed 
the monotonic property still. But I don't see why that function 
shouldn't just be time.monotonic().

Janzert

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