Skip to content

Commit cc8ddc8

Browse files
Re-add accidentally deleted function - oops.
1 parent c5da11c commit cc8ddc8

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

python_config/pytime.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,21 @@ pymonotonic(_PyTime_t *tp, _Py_clock_info_t *info, int raise)
564564
return pygettimeofday(tp, info, raise); /* should be good enough? */
565565
}
566566

567+
_PyTime_t
568+
_PyTime_GetMonotonicClock(void)
569+
{
570+
_PyTime_t t;
571+
if (pymonotonic(&t, NULL, 0) < 0) {
572+
/* should not happen, _PyTime_Init() checked that monotonic clock at
573+
startup */
574+
assert(0);
575+
576+
/* use a fixed value instead of a random value from the stack */
577+
t = 0;
578+
}
579+
return t;
580+
}
581+
567582
int
568583
_PyTime_GetMonotonicClockWithInfo(_PyTime_t *tp, _Py_clock_info_t *info)
569584
{

0 commit comments

Comments
 (0)