summaryrefslogtreecommitdiffstats
path: root/Include/pytime.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/pytime.h')
-rw-r--r--Include/pytime.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/Include/pytime.h b/Include/pytime.h
index 1f14d6d..bf237c8 100644
--- a/Include/pytime.h
+++ b/Include/pytime.h
@@ -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);