summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-04-03 11:10:54 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-04-03 11:10:54 (GMT)
commit13019fdef3b6d589f8d7602943c76fcc637114ea (patch)
tree975aa7bea2e9e07236ef08b4e485e46079ff5b9f /Include
parent21dfffa218be821af03bc3cdf928a62e9431aaf8 (diff)
downloadcpython-13019fdef3b6d589f8d7602943c76fcc637114ea.zip
cpython-13019fdef3b6d589f8d7602943c76fcc637114ea.tar.gz
cpython-13019fdef3b6d589f8d7602943c76fcc637114ea.tar.bz2
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).
Diffstat (limited to 'Include')
-rw-r--r--Include/pytime.h5
1 files changed, 4 insertions, 1 deletions
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 @@ PyAPI_FUNC(int) _PyTime_ObjectToTimespec(
_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.