Repository navigation
Conversation
- On Windows, the .time function now uses GetSystemTimePreciseAsFileTime() [--> 1 microsecond resolution] instead of GetSystemTimeAsFileTime() [--> 15.625 millisecond resolution]. - On Windows The .monotonic functions now use the same clock as the .perf_counter functions, not vice versa. The .perf_counter functions previously already used QueryPerformanceCounter() + QueryPerformanceFrequency() [--> 1 microsecond resolution], whereas the .monotonic functions used GetTickCount64() [--> 15.625 millisecond resolution].
vadmium
reviewed
Nov 17, 2024
| .. impl-detail:: | ||
|
|
||
| On CPython, use the same clock as :func:`time.perf_counter` and is a | ||
| monotonic clock, i.e. a clock that cannot go backwards. |
Member
There was a problem hiding this comment.
This makes more sense under perf_counter were it was. All monotonic function should always be monotonic, by definition.
| On macOS, the function is now system-wide. | ||
|
|
||
| .. versionchanged:: 3.13 | ||
| Use the same clock as :func:`time.perf_counter`. On Windows, :func:`monotonic` |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Comment on lines
+316
to
+317
| Use the same clock as :func:`time.perf_counter`. On Windows, :func:`monotonic` | ||
| now call ``QueryPerformanceCounter()`` which has a resolution of 1 microsecond, |
Member
There was a problem hiding this comment.
Suggested change
| Use the same clock as :func:`time.perf_counter`. On Windows, :func:`monotonic` | |
| now call ``QueryPerformanceCounter()`` which has a resolution of 1 microsecond, | |
| Use the same clock as :func:`time.perf_counter`. On Windows, :func:`monotonic` | |
| now calls ``QueryPerformanceCounter()`` which has a resolution of 1 microsecond, |
| Use :func:`time_ns` to avoid the precision loss caused by the :class:`float` | ||
| type. | ||
|
|
||
| .. versionchanged:: 3.13 |
Member
There was a problem hiding this comment.
Suggested change
| .. versionchanged:: 3.13 | |
| .. versionchanged:: 3.13 |
Suspect the mixed indentation is screwing it up
vadmium
reviewed
Nov 17, 2024
| On macOS, the function is now system-wide. | ||
|
|
||
| .. versionchanged:: 3.13 | ||
| Use the same clock as :func:`time.perf_counter`. On Windows, :func:`monotonic` |
Member
There was a problem hiding this comment.
Suggested change
| Use the same clock as :func:`time.perf_counter`. On Windows, :func:`monotonic` | |
| The function now uses the same clock as :func:`time.perf_counter`. On Windows, :func:`monotonic` |
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.
📚 Documentation preview 📚: https://cpython-previews--126744.org.readthedocs.build/