summaryrefslogtreecommitdiffstats
path: root/Modules/_testinternalcapi/test_lock.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2024-02-20 22:16:37 (GMT)
committerGitHub <noreply@github.com>2024-02-20 22:16:37 (GMT)
commit52d14775665a6fde518ee3da88a73f39b09d993f (patch)
tree7aa83b307d5af59761a769d4a54746b7a7c81fc2 /Modules/_testinternalcapi/test_lock.c
parente1fdc3c323bd605f92622b7ee18805885ff0bb4e (diff)
downloadcpython-52d14775665a6fde518ee3da88a73f39b09d993f.zip
cpython-52d14775665a6fde518ee3da88a73f39b09d993f.tar.gz
cpython-52d14775665a6fde518ee3da88a73f39b09d993f.tar.bz2
gh-110850: Rename internal PyTime C API functions (#115734)
Rename functions: * _PyTime_GetSystemClock() => _PyTime_TimeUnchecked() * _PyTime_GetPerfCounter() => _PyTime_PerfCounterUnchecked() * _PyTime_GetMonotonicClock() => _PyTime_MonotonicUnchecked() * _PyTime_GetSystemClockWithInfo() => _PyTime_TimeWithInfo() * _PyTime_GetMonotonicClockWithInfo() => _PyTime_MonotonicWithInfo() * _PyTime_GetMonotonicClockWithInfo() => _PyTime_MonotonicWithInfo() Changes: * Remove "typedef PyTime_t PyTime_t;" which was "typedef PyTime_t _PyTime_t;" before a previous rename. * Update comments of "Unchecked" functions. * Remove invalid PyTime_Time() comment.
Diffstat (limited to 'Modules/_testinternalcapi/test_lock.c')
-rw-r--r--Modules/_testinternalcapi/test_lock.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_testinternalcapi/test_lock.c b/Modules/_testinternalcapi/test_lock.c
index 724bbd0..1c50481 100644
--- a/Modules/_testinternalcapi/test_lock.c
+++ b/Modules/_testinternalcapi/test_lock.c
@@ -2,7 +2,7 @@
#include "parts.h"
#include "pycore_lock.h"
-#include "pycore_time.h" // _PyTime_GetMonotonicClock()
+#include "pycore_time.h" // _PyTime_MonotonicUnchecked()
#include "clinic/test_lock.c.h"
@@ -290,7 +290,7 @@ _testinternalcapi_benchmark_locks_impl(PyObject *module,
goto exit;
}
- PyTime_t start = _PyTime_GetMonotonicClock();
+ PyTime_t start = _PyTime_MonotonicUnchecked();
for (Py_ssize_t i = 0; i < num_threads; i++) {
thread_data[i].bench_data = &bench_data;
@@ -307,7 +307,7 @@ _testinternalcapi_benchmark_locks_impl(PyObject *module,
}
Py_ssize_t total_iters = bench_data.total_iters;
- PyTime_t end = _PyTime_GetMonotonicClock();
+ PyTime_t end = _PyTime_MonotonicUnchecked();
// Return the total number of acquisitions and the number of acquisitions
// for each thread.