summaryrefslogtreecommitdiffstats
path: root/Python/pytime.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pytime.c')
-rw-r--r--Python/pytime.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/Python/pytime.c b/Python/pytime.c
index 8035a5f..7f9f301 100644
--- a/Python/pytime.c
+++ b/Python/pytime.c
@@ -33,6 +33,7 @@
/* Conversion from nanoseconds */
#define NS_TO_MS (1000 * 1000)
#define NS_TO_US (1000)
+#define NS_TO_100NS (100)
static void
@@ -568,6 +569,16 @@ _PyTime_AsNanoseconds(_PyTime_t t)
}
+#ifdef MS_WINDOWS
+_PyTime_t
+_PyTime_As100Nanoseconds(_PyTime_t t, _PyTime_round_t round)
+{
+ _PyTime_t ns = pytime_as_nanoseconds(t);
+ return pytime_divide(ns, NS_TO_100NS, round);
+}
+#endif
+
+
_PyTime_t
_PyTime_AsMicroseconds(_PyTime_t t, _PyTime_round_t round)
{