[Python-Dev] PEP 418: Add monotonic clock
Charles-François Natali
neologix at free.fr
Wed Mar 28 19:31:21 CEST 2012
More information about the Python-Dev mailing list
Wed Mar 28 19:31:21 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 ]
> What's wrong with "time.time()" again? As documented in > http://docs.python.org/py3k/library/time.html it makes no guarantees, > and specifically there is *no* guarantee that it will ever behave > *badly*<wink/>. Of course, we'll have to guarantee that, if a > badly-behaved clock is available, users can get access to it, so call > that time._time(). I'm not sure I understand your suggestion correctly, but replacing time.time() by time.monotonic() with fallback won't work, because time.monotonic() isn't wall-clock time: it can very well use an arbitrary reference point (most likely system start-up time). As for the hires() function, since there's no guarantee whatsoever that it does provide a better resolution than time.time(), this would be really misleading IMHO.
- 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 ]
More information about the Python-Dev mailing list