GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||
GeezerVison is showing github.com — gh-63207: Use GetSystemTimePreciseAsFileTime() in time.time() by vstinner · Pull Request #116822 · python/cpython Conversation
|
|
Clock resolution measured by the script: #116781 (comment) Before: After:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
On a release build (build using Well, more and more operating have two clocks: one slow but accurate, and one fast but less accurate. Example on Linux:
Python uses CLOCK_REALTIME for time.time(), the most precise one. So it's consistent to use the most accurate clock for time.time() on Windows as well. If tomorrow, performance becomes an issue, we can add a new |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Impressive! Finally Windows will be as good as other platforms here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| #endif | ||
|
|
||
|
|
||
| #ifdef MS_WINDOWS |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think checking for MS_WINDOWS here is sufficient. GetSystemTimePreciseAsFileTime(), QueryPerformanceCounter(), and QueryPerformanceFrequency() are available in the system, app, and game partitions. The old use of GetSystemTimeAdjustment() actually wasn't supported for app builds. However, that function was used improperly anyway.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Closes dask#8641. _WindowsTime is no longer needed on Windows with Python 3.13. On Windows, Python 3.13 now uses GetSystemTimePreciseAsFileTime() for time.time() and QueryPerformanceCounter() for time.monotonic(). * python/cpython#116781 * python/cpython#116822
Closes #8641. _WindowsTime is no longer needed on Windows with Python 3.13. On Windows, Python 3.13 now uses GetSystemTimePreciseAsFileTime() for time.time() and QueryPerformanceCounter() for time.monotonic(). * python/cpython#116781 * python/cpython#116822
pythonGH-136068) (cherry picked from commit 486587d) Co-authored-by: Stan Ulbrych <[email protected]>
pythonGH-136068) (cherry picked from commit 486587d) Co-authored-by: Stan Ulbrych <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.