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:
Victor Stinner 2024-02-21 00:31:30 +01:00 • committed by GitHub
parent 52d1477566
commit 145bc2d638
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 39 additions and 55 deletions

View file

@ -1948,7 +1948,7 @@ thread_module_exec(PyObject *module)
// TIMEOUT_MAX
double timeout_max = (double)PY_TIMEOUT_MAX * 1e-6;
double time_max = _PyTime_AsSecondsDouble(_PyTime_MAX);
double time_max = PyTime_AsSecondsDouble(_PyTime_MAX);
timeout_max = Py_MIN(timeout_max, time_max);
// Round towards minus infinity
timeout_max = floor(timeout_max);