@@ -601,12 +601,8 @@ _PyTime_GetSystemClockWithInfo(_PyTime_t *t, _Py_clock_info_t *info)
601601
602602
603603static int
604- pymonotonic_new (_PyTime_t * tp , _Py_clock_info_t * info , int raise )
604+ pymonotonic (_PyTime_t * tp , _Py_clock_info_t * info , int raise )
605605{
606- #ifdef Py_DEBUG
607- static int last_set = 0 ;
608- static _PyTime_t last = 0 ;
609- #endif
610606#if defined(MS_WINDOWS )
611607 ULONGLONG result ;
612608
@@ -697,12 +693,6 @@ pymonotonic_new(_PyTime_t *tp, _Py_clock_info_t *info, int raise)
697693 }
698694 if (_PyTime_FromTimespec (tp , & ts , raise ) < 0 )
699695 return -1 ;
700- #endif
701- #ifdef Py_DEBUG
702- /* monotonic clock cannot go backward */
703- assert (!last_set || last <= * tp );
704- last = * tp ;
705- last_set = 1 ;
706696#endif
707697 return 0 ;
708698}
@@ -711,7 +701,7 @@ _PyTime_t
711701_PyTime_GetMonotonicClock (void )
712702{
713703 _PyTime_t t ;
714- if (pymonotonic_new (& t , NULL , 0 ) < 0 ) {
704+ if (pymonotonic (& t , NULL , 0 ) < 0 ) {
715705 /* should not happen, _PyTime_Init() checked that monotonic clock at
716706 startup */
717707 assert (0 );
@@ -725,7 +715,7 @@ _PyTime_GetMonotonicClock(void)
725715int
726716_PyTime_GetMonotonicClockWithInfo (_PyTime_t * tp , _Py_clock_info_t * info )
727717{
728- return pymonotonic_new (tp , info , 1 );
718+ return pymonotonic (tp , info , 1 );
729719}
730720
731721int
0 commit comments