mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
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.
This commit is contained in:
parent
e1fdc3c323
commit
52d1477566
16 changed files with 68 additions and 83 deletions
|
@ -1108,7 +1108,7 @@ gc_collect_main(PyThreadState *tstate, int generation, _PyGC_Reason reason)
|
|||
if (gcstate->debug & _PyGC_DEBUG_STATS) {
|
||||
PySys_WriteStderr("gc: collecting generation %d...\n", generation);
|
||||
show_stats_each_generations(gcstate);
|
||||
t1 = _PyTime_GetPerfCounter();
|
||||
t1 = _PyTime_PerfCounterUnchecked();
|
||||
}
|
||||
|
||||
if (PyDTrace_GC_START_ENABLED()) {
|
||||
|
@ -1136,7 +1136,7 @@ gc_collect_main(PyThreadState *tstate, int generation, _PyGC_Reason reason)
|
|||
n = state.uncollectable;
|
||||
|
||||
if (gcstate->debug & _PyGC_DEBUG_STATS) {
|
||||
double d = _PyTime_AsSecondsDouble(_PyTime_GetPerfCounter() - t1);
|
||||
double d = _PyTime_AsSecondsDouble(_PyTime_PerfCounterUnchecked() - t1);
|
||||
PySys_WriteStderr(
|
||||
"gc: done, %zd unreachable, %zd uncollectable, %.4fs elapsed\n",
|
||||
n+m, n, d);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue