| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
This PR fixes a regression of the commit a997c7b which caused precision loss in time.clock() and time.perf_counter() on Windows. |
Sorry, something went wrong.
time.clock() and time.perf_counter() now use again C double internally. Remove also _PyTime_GetWinPerfCounterWithInfo(): use _PyTime_GetPerfCounterDoubleWithInfo() instead on Windows.
| return NULL; | ||
| } | ||
| return _PyFloat_FromPyTime(t); | ||
| return PyFloat_FromDouble(d); |
There was a problem hiding this comment.
Maybe just return perf_counter(info)?
Sorry, something went wrong.
There was a problem hiding this comment.
Right, done.
Sorry, something went wrong.
| { | ||
| #ifdef MS_WINDOWS | ||
| return _PyTime_GetWinPerfCounterWithInfo(t, info); | ||
| return win_perf_counter(&d, info); |
There was a problem hiding this comment.
&d -> d
The compiler emits a warning, but not an error.
Sorry, something went wrong.
There was a problem hiding this comment.
Oops, I didn't have time to test my change. It's now fixed (and I tested it this time).
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request. |
Sorry, something went wrong.
Fix also a typo in win_perf_counter()
|
Thanks for the review @serhiy-storchaka! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
time.clock() and time.perf_counter() now use again C double
internally.
Remove also _PyTime_GetWinPerfCounterWithInfo(): use
_PyTime_GetPerfCounterDoubleWithInfo() instead on Windows.
https://bugs.python.org/issue31773