mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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).
This commit is contained in:
parent
21dfffa218
commit
13019fdef3
6 changed files with 45 additions and 5 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue