Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace time.clock with time.perf_counter #172

Merged
merged 1 commit into from
Nov 19, 2019

Conversation

OskarPersson
Copy link
Contributor

time.clock was deprecated in Python 3.3 and removed in 3.8

@mistydemeo
Copy link
Contributor

Unfortunately, time.perf_counter isn't available in Python 2. Is there a reasonable way we can try to accommodate both? Say, at the top among the imports doing:

try:
    from time import perf_counter as clock
except ImportError:
    from time import clock

And then switching all usages to just clock().

Looks like the code using this isn't exercised by CI, which is why CI is passing on Python 2.

@ablwr ablwr merged commit cc98d1e into openpreserve:master Nov 19, 2019
@OskarPersson OskarPersson deleted the clock-perf-counter branch November 19, 2019 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants