[Python-Dev] PEP 418: Add monotonic clock (original) (raw)
Lennart Regebro regebro at gmail.com
Fri Mar 30 21:01:07 CEST 2012
- Previous message: [Python-Dev] PEP 418: Add monotonic clock
- Next message: [Python-Dev] PEP 418: Add monotonic clock
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
The overview of the different monotonic clocks was interesting, because only one of them is adjusted by NTP, and that's the unix CLOCK_MONOTONIC. Hence we don't need a raw=False flag, which I previously suggested, we only need to not use CLOCK_MONOTONIC (which the PEP psuedo-code indeed also does not do, so that's all good).
That means I think the PEP is fine now, if we rename highres(). time.time() already gets the highest resolution clock it can. Hence a highres() is confusing as the name implies that it returns a higher resolution clock than time.time(). And the name does not in any way indicate that the returned clock might be monotonic. try_monotonic() seems the obvious choice, since that's what it actually does.
//Lennart
- Previous message: [Python-Dev] PEP 418: Add monotonic clock
- Next message: [Python-Dev] PEP 418: Add monotonic clock
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]