Repository navigation
Use realistic timer for Gauge.set_to_current_time - #109
Merged
Merged
Conversation
set_to_current_time is expected to set the value to a realistic time. Performance counters are monotonic but don't say anything about the actual time.
Contributor
|
My reading of the docs is that this is wall time. |
Contributor
Author
|
What exactly? You docs say that it sets to current unix time which I thought to be epoch time. However: >>> from timeit import default_timer
>>> from time import time
>>> from datetime import datetime
>>> datetime.fromtimestamp(default_timer())
datetime.datetime(1970, 1, 5, 19, 25, 4, 943824)
>>> datetime.fromtimestamp(time())
datetime.datetime(2016, 10, 17, 19, 50, 9, 261461)This seems rather useless to me and a pretty bad regression IMHO (got a lot of |
Contributor
Author
|
Oh i think I understand now; you’ve been referring to legacy (2.7) docs. default_timer is (and I thought that was kind of the point of the change?) |
Contributor
|
Thanks! |
Contributor
Author
|
It would be really cool if you could push a quick new release, since this is a nasty regression on Python 3.3+ and will probably also confuse new users. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
set_to_current_time is expected to set the value to a realistic time.
Performance counters are monotonic but don't say anything about the actual
time.