[Python-Dev] PEP 418: Add monotonic clock (original) (raw)
Victor Stinner victor.stinner at gmail.com
Tue Mar 27 19:34:51 CEST 2012
- Previous message: [Python-Dev] PEP 418: Add monotonic clock
- Next message: [Python-Dev] how to uninstall python after 'make build'
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I started to write the PEP 418 to clarify the notions of monotonic and steady clocks.
I replaced time.steady() by time.try_monotonic(). I misunderstood "may not" in the C++ doc: I understood it as "it may be adjusted by NTP", whereas it means "it cannot be adjusted". Sorry for the confusion.
I added a time.hires() clock because time.monotonic() and time.try_monotonic() are not the best clocks for profiling or benchmarking. For example, on Windows, time.hires() uses QueryPerformanceCounter() whereas time.monotonic() and time.try_monotonic() uses GetTickCount64.
I added the pseudo-code of each function. I hope that it is easier to understand than a long text.
Victor
- Previous message: [Python-Dev] PEP 418: Add monotonic clock
- Next message: [Python-Dev] how to uninstall python after 'make build'
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]