mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
Issue #23485: Add _PyTime_FromMillisecondsObject() function
This commit is contained in:
parent
749a6a85c6
commit
fa09beb150
2 changed files with 25 additions and 6 deletions
|
|
@ -69,12 +69,18 @@ PyAPI_FUNC(int) _PyTime_ObjectToTimespec(
|
|||
/* Create a timestamp from a number of nanoseconds (C long). */
|
||||
PyAPI_FUNC(_PyTime_t) _PyTime_FromNanoseconds(PY_LONG_LONG ns);
|
||||
|
||||
/* Convert a Python float or int to a timetamp.
|
||||
/* Convert a number of seconds (Python float or int) to a timetamp.
|
||||
Raise an exception and return -1 on error, return 0 on success. */
|
||||
PyAPI_FUNC(int) _PyTime_FromSecondsObject(_PyTime_t *t,
|
||||
PyObject *obj,
|
||||
_PyTime_round_t round);
|
||||
|
||||
/* Convert a number of milliseconds (Python float or int, 10^-3) to a timetamp.
|
||||
Raise an exception and return -1 on error, return 0 on success. */
|
||||
PyAPI_FUNC(int) _PyTime_FromMillisecondsObject(_PyTime_t *t,
|
||||
PyObject *obj,
|
||||
_PyTime_round_t round);
|
||||
|
||||
/* Convert a timestamp to a number of seconds as a C double. */
|
||||
PyAPI_FUNC(double) _PyTime_AsSecondsDouble(_PyTime_t t);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue