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.time() with time.perf_counter() #1777

Merged
merged 1 commit into from
May 15, 2023

Conversation

living180
Copy link
Contributor

Description

time.perf_counter() is guaranteed to use the highest-resolution clock available, and is monotonically increasing, neither of which are true for time.time(). Thanks @matthiask for the suggestion!

Checklist:

  • I have added the relevant tests for this change.
  • I have added an item to the Pending section of docs/changes.rst.

time.perf_counter() is guaranteed to use the highest-resolution clock
available, and is monotonically increasing, neither of which are true
for time.time().  Thanks @matthiask for the suggestion!
@matthiask matthiask merged commit 43a87f7 into django-commons:main May 15, 2023
@matthiask
Copy link
Member

Thank you!

@living180 living180 deleted the perf_counter branch May 16, 2023 12:03
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.

2 participants