mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
gh-110850: Use public PyTime functions (#115746)
Replace private _PyTime functions with public PyTime functions. random_seed_time_pid() now reports errors to its caller.
This commit is contained in:
parent
52d1477566
commit
145bc2d638
12 changed files with 39 additions and 55 deletions
|
@ -1428,7 +1428,7 @@ gc_collect_main(PyThreadState *tstate, int generation, _PyGC_Reason reason)
|
|||
debug_cycle("uncollectable", FROM_GC(gc));
|
||||
}
|
||||
if (gcstate->debug & _PyGC_DEBUG_STATS) {
|
||||
double d = _PyTime_AsSecondsDouble(_PyTime_PerfCounterUnchecked() - t1);
|
||||
double d = PyTime_AsSecondsDouble(_PyTime_PerfCounterUnchecked() - t1);
|
||||
PySys_WriteStderr(
|
||||
"gc: done, %zd unreachable, %zd uncollectable, %.4fs elapsed\n",
|
||||
n+m, n, d);
|
||||
|
|
|
@ -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_PerfCounterUnchecked() - 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