summaryrefslogtreecommitdiffstats
path: root/Include/cpython/pytime.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/cpython/pytime.h')
-rw-r--r--Include/cpython/pytime.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/cpython/pytime.h b/Include/cpython/pytime.h
index 23d4f16..e64f3b1 100644
--- a/Include/cpython/pytime.h
+++ b/Include/cpython/pytime.h
@@ -130,6 +130,10 @@ PyAPI_FUNC(_PyTime_t) _PyTime_FromSeconds(int seconds);
/* Create a timestamp from a number of nanoseconds. */
PyAPI_FUNC(_PyTime_t) _PyTime_FromNanoseconds(_PyTime_t ns);
+/* Create a timestamp from a number of microseconds.
+ * Clamp to [_PyTime_MIN; _PyTime_MAX] on overflow. */
+PyAPI_FUNC(_PyTime_t) _PyTime_FromMicrosecondsClamp(_PyTime_t us);
+
/* Create a timestamp from nanoseconds (Python int). */
PyAPI_FUNC(int) _PyTime_FromNanosecondsObject(_PyTime_t *t,
PyObject *obj);