Issue #22117: Add a new _PyTime_FromSeconds() function
Fix also _Py_InitializeEx_Private(): initialize time before initializing
import, import_init() uses the _PyTime API (for thread locks).
diff --git a/Include/pytime.h b/Include/pytime.h
index bf237c8..bf0dcd8 100644
--- a/Include/pytime.h
+++ b/Include/pytime.h
@@ -66,7 +66,10 @@
_PyTime_round_t);
-/* Create a timestamp from a number of nanoseconds (C long). */
+/* Create a timestamp from a number of seconds. */
+PyAPI_FUNC(_PyTime_t) _PyTime_FromSeconds(int ns);
+
+/* Create a timestamp from a number of nanoseconds. */
PyAPI_FUNC(_PyTime_t) _PyTime_FromNanoseconds(PY_LONG_LONG ns);
/* Convert a number of seconds (Python float or int) to a timetamp.