Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
gh-110850: Add PyTime_TimeRaw() function#118394
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Add "Raw" variant of PyTime functions:* PyTime_MonotonicRaw()* PyTime_PerfCounterRaw()* PyTime_TimeRaw()Changes:* Add documentation and tests. Tests release the GIL while calling raw clock functions.* py_get_system_clock() and py_get_monotonic_clock() now check that the GIL is hold by the caller if raise_exc is non-zero.* Reimplement "Unchecked" functions with raw clock functions.
cc@encukou |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thank you!
I have a few suggestions, which I've also tested locally. I've sent them as a PR:vstinner#2
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
@encukou: I applied your suggestion, but I replaced the assert() with Py_FatalError(). Also, I added a code path with |
Don't bother too much about "Unchecked" functions. Once this PR will land, I will write a PR to remove "Unchecked" functions (use "Raw" functions instead). |
Thanks! |
Add "Raw" variant of PyTime functions:* PyTime_MonotonicRaw()* PyTime_PerfCounterRaw()* PyTime_TimeRaw()Changes:* Add documentation and tests. Tests release the GIL while calling raw clock functions.* py_get_system_clock() and py_get_monotonic_clock() now check that the GIL is hold by the caller if raise_exc is non-zero.* Reimplement "Unchecked" functions with raw clock functions.Co-authored-by: Petr Viktorin <encukou@gmail.com>
Uh oh!
There was an error while loading.Please reload this page.
Add "Raw" variant of PyTime functions:
Changes:
📚 Documentation preview 📚:https://cpython-previews--118394.org.readthedocs.build/