@@ -95,8 +95,8 @@ floatclock(_Py_clock_info_t *info)
9595 if (info ) {
9696 info -> implementation = "clock()" ;
9797 info -> resolution = 1.0 / (double )CLOCKS_PER_SEC ;
98- info -> is_monotonic = 1 ;
99- info -> is_adjusted = 0 ;
98+ info -> monotonic = 1 ;
99+ info -> adjusted = 0 ;
100100 }
101101 return PyFloat_FromDouble ((double )value / CLOCKS_PER_SEC );
102102}
@@ -131,8 +131,8 @@ win_perf_counter(_Py_clock_info_t *info, PyObject **result)
131131 if (info ) {
132132 info -> implementation = "QueryPerformanceCounter()" ;
133133 info -> resolution = 1.0 / (double )cpu_frequency ;
134- info -> is_monotonic = 1 ;
135- info -> is_adjusted = 0 ;
134+ info -> monotonic = 1 ;
135+ info -> adjusted = 0 ;
136136 }
137137 * result = PyFloat_FromDouble (diff / (double )cpu_frequency );
138138 return 0 ;
@@ -874,15 +874,15 @@ pymonotonic(_Py_clock_info_t *info)
874874 info -> implementation = "GetTickCount64()" ;
875875 else
876876 info -> implementation = "GetTickCount()" ;
877- info -> is_monotonic = 1 ;
877+ info -> monotonic = 1 ;
878878 ok = GetSystemTimeAdjustment (& timeAdjustment , & timeIncrement ,
879879 & isTimeAdjustmentDisabled );
880880 if (!ok ) {
881881 PyErr_SetFromWindowsErr (0 );
882882 return NULL ;
883883 }
884884 info -> resolution = timeIncrement * 1e-7 ;
885- info -> is_adjusted = 0 ;
885+ info -> adjusted = 0 ;
886886 }
887887 return PyFloat_FromDouble (result );
888888
@@ -902,8 +902,8 @@ pymonotonic(_Py_clock_info_t *info)
902902 if (info ) {
903903 info -> implementation = "mach_absolute_time()" ;
904904 info -> resolution = (double )timebase .numer / timebase .denom * 1e-9 ;
905- info -> is_monotonic = 1 ;
906- info -> is_adjusted = 0 ;
905+ info -> monotonic = 1 ;
906+ info -> adjusted = 0 ;
907907 }
908908 return PyFloat_FromDouble (secs );
909909
@@ -924,14 +924,14 @@ pymonotonic(_Py_clock_info_t *info)
924924
925925 if (info ) {
926926 struct timespec res ;
927- info -> is_monotonic = 1 ;
927+ info -> monotonic = 1 ;
928928 info -> implementation = function ;
929929#if (defined(linux ) || defined(__linux ) || defined(__linux__ )) \
930930 && !defined(CLOCK_HIGHRES )
931931 /* CLOCK_MONOTONIC is adjusted on Linux */
932- info -> is_adjusted = 1 ;
932+ info -> adjusted = 1 ;
933933#else
934- info -> is_adjusted = 0 ;
934+ info -> adjusted = 0 ;
935935#endif
936936 if (clock_getres (clk_id , & res ) == 0 )
937937 info -> resolution = res .tv_sec + res .tv_nsec * 1e-9 ;
@@ -1023,8 +1023,8 @@ py_process_time(_Py_clock_info_t *info)
10231023 if (info ) {
10241024 info -> implementation = "GetProcessTimes()" ;
10251025 info -> resolution = 1e-7 ;
1026- info -> is_monotonic = 1 ;
1027- info -> is_adjusted = 0 ;
1026+ info -> monotonic = 1 ;
1027+ info -> adjusted = 0 ;
10281028 }
10291029 return PyFloat_FromDouble (total * 1e-7 );
10301030#else
@@ -1052,8 +1052,8 @@ py_process_time(_Py_clock_info_t *info)
10521052 if (info ) {
10531053 struct timespec res ;
10541054 info -> implementation = function ;
1055- info -> is_monotonic = 1 ;
1056- info -> is_adjusted = 0 ;
1055+ info -> monotonic = 1 ;
1056+ info -> adjusted = 0 ;
10571057 if (clock_getres (clk_id , & res ) == 0 )
10581058 info -> resolution = res .tv_sec + res .tv_nsec * 1e-9 ;
10591059 else
@@ -1070,8 +1070,8 @@ py_process_time(_Py_clock_info_t *info)
10701070 total += ru .ru_stime .tv_sec + ru .ru_stime .tv_usec * 1e-6 ;
10711071 if (info ) {
10721072 info -> implementation = "getrusage(RUSAGE_SELF)" ;
1073- info -> is_monotonic = 1 ;
1074- info -> is_adjusted = 0 ;
1073+ info -> monotonic = 1 ;
1074+ info -> adjusted = 0 ;
10751075 info -> resolution = 1e-6 ;
10761076 }
10771077 return PyFloat_FromDouble (total );
@@ -1099,8 +1099,8 @@ py_process_time(_Py_clock_info_t *info)
10991099 total += (double )t .tms_stime / ticks_per_second ;
11001100 if (info ) {
11011101 info -> implementation = "times()" ;
1102- info -> is_monotonic = 1 ;
1103- info -> is_adjusted = 0 ;
1102+ info -> monotonic = 1 ;
1103+ info -> adjusted = 0 ;
11041104 info -> resolution = 1.0 / ticks_per_second ;
11051105 }
11061106 return PyFloat_FromDouble (total );
@@ -1132,8 +1132,8 @@ PyDoc_STRVAR(ClockInfo_docstring,
11321132static PyStructSequence_Field ClockInfo_fields [] = {
11331133 {"implementation" , "name of the underlying C function "
11341134 "used to get the clock value" },
1135- {"is_monotonic " , "True if the clock cannot go backward, False otherwise" },
1136- {"is_adjusted " , "True if the clock can be adjusted "
1135+ {"monotonic " , "True if the clock cannot go backward, False otherwise" },
1136+ {"adjusted " , "True if the clock can be adjusted "
11371137 "(e.g. by a NTP daemon), False otherwise" },
11381138 {"resolution" , "resolution of the clock in seconds" },
11391139 {NULL , NULL }
@@ -1159,13 +1159,13 @@ time_get_clock_info(PyObject *self, PyObject *args)
11591159
11601160#ifdef Py_DEBUG
11611161 info .implementation = NULL ;
1162- info .is_monotonic = -1 ;
1163- info .is_adjusted = -1 ;
1162+ info .monotonic = -1 ;
1163+ info .adjusted = -1 ;
11641164 info .resolution = -1.0 ;
11651165#else
11661166 info .implementation = "" ;
1167- info .is_monotonic = 0 ;
1168- info .is_adjusted = 0 ;
1167+ info .monotonic = 0 ;
1168+ info .adjusted = 0 ;
11691169 info .resolution = 1.0 ;
11701170#endif
11711171
@@ -1201,14 +1201,14 @@ time_get_clock_info(PyObject *self, PyObject *args)
12011201 goto error ;
12021202 PyStructSequence_SET_ITEM (result , 0 , obj );
12031203
1204- assert (info .is_monotonic != -1 );
1205- obj = PyBool_FromLong (info .is_monotonic );
1204+ assert (info .monotonic != -1 );
1205+ obj = PyBool_FromLong (info .monotonic );
12061206 if (obj == NULL )
12071207 goto error ;
12081208 PyStructSequence_SET_ITEM (result , 1 , obj );
12091209
1210- assert (info .is_adjusted != -1 );
1211- obj = PyBool_FromLong (info .is_adjusted );
1210+ assert (info .adjusted != -1 );
1211+ obj = PyBool_FromLong (info .adjusted );
12121212 if (obj == NULL )
12131213 goto error ;
12141214 PyStructSequence_SET_ITEM (result , 2 , obj );
@@ -1487,8 +1487,8 @@ floattime(_Py_clock_info_t *info)
14871487 if (info ) {
14881488 struct timespec res ;
14891489 info -> implementation = "clock_gettime(CLOCK_REALTIME)" ;
1490- info -> is_monotonic = 0 ;
1491- info -> is_adjusted = 1 ;
1490+ info -> monotonic = 0 ;
1491+ info -> adjusted = 1 ;
14921492 if (clock_getres (CLOCK_REALTIME , & res ) == 0 )
14931493 info -> resolution = res .tv_sec + res .tv_nsec * 1e-9 ;
14941494 else
0 commit comments