summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2024-05-01 18:05:01 (GMT)
committerGitHub <noreply@github.com>2024-05-01 18:05:01 (GMT)
commitb52c753e0fb8b87c7a0e3f1c72acd18327d8d16b (patch)
tree0ffb22ddef0675046cd44d9aec0361b5fce0f4cd /Include
parenta8bcf3ec3284f042dab9cad676951092fb1f9890 (diff)
downloadcpython-b52c753e0fb8b87c7a0e3f1c72acd18327d8d16b.zip
cpython-b52c753e0fb8b87c7a0e3f1c72acd18327d8d16b.tar.gz
cpython-b52c753e0fb8b87c7a0e3f1c72acd18327d8d16b.tar.bz2
gh-110850: Add PyTime_TimeRaw() function (#118394)
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>
Diffstat (limited to 'Include')
-rw-r--r--Include/cpython/pytime.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/cpython/pytime.h b/Include/cpython/pytime.h
index d824470..5c68110 100644
--- a/Include/cpython/pytime.h
+++ b/Include/cpython/pytime.h
@@ -16,6 +16,10 @@ PyAPI_FUNC(int) PyTime_Monotonic(PyTime_t *result);
PyAPI_FUNC(int) PyTime_PerfCounter(PyTime_t *result);
PyAPI_FUNC(int) PyTime_Time(PyTime_t *result);
+PyAPI_FUNC(int) PyTime_MonotonicRaw(PyTime_t *result);
+PyAPI_FUNC(int) PyTime_PerfCounterRaw(PyTime_t *result);
+PyAPI_FUNC(int) PyTime_TimeRaw(PyTime_t *result);
+
#ifdef __cplusplus
}
#endif