summaryrefslogtreecommitdiffstats
path: root/Python/pytime.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pytime.c')
-rw-r--r--Python/pytime.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Python/pytime.c b/Python/pytime.c
index f49a25b..01c07da 100644
--- a/Python/pytime.c
+++ b/Python/pytime.c
@@ -406,6 +406,14 @@ _PyTime_FromNanoseconds(_PyTime_t ns)
}
+_PyTime_t
+_PyTime_FromMicrosecondsClamp(_PyTime_t us)
+{
+ _PyTime_t ns = _PyTime_Mul(us, US_TO_NS);
+ return pytime_from_nanoseconds(ns);
+}
+
+
int
_PyTime_FromNanosecondsObject(_PyTime_t *tp, PyObject *obj)
{