summaryrefslogtreecommitdiffstats
path: root/Python/pytime.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2012-06-12 20:46:37 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2012-06-12 20:46:37 (GMT)
commit2b89fdf7eb17b5ca3928aa3c2f6552e79386c677 (patch)
tree644b67cd605fd28d1b8d676b79787cf03fd4d3df /Python/pytime.c
parentbda4b8802c9693cd1c6f97cc09e34c4f63b030ef (diff)
downloadcpython-2b89fdf7eb17b5ca3928aa3c2f6552e79386c677.zip
cpython-2b89fdf7eb17b5ca3928aa3c2f6552e79386c677.tar.gz
cpython-2b89fdf7eb17b5ca3928aa3c2f6552e79386c677.tar.bz2
PEP 418: Rename adjusted attribute to adjustable in time.get_clock_info() result
Fix also its value on Windows and Linux according to its documentation: "adjustable" indicates if the clock *can be* adjusted, not if it is or was adjusted. In most cases, it is not possible to indicate if a clock is or was adjusted.
Diffstat (limited to 'Python/pytime.c')
-rw-r--r--Python/pytime.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/Python/pytime.c b/Python/pytime.c
index eb5685b..beeab87 100644
--- a/Python/pytime.c
+++ b/Python/pytime.c
@@ -44,10 +44,7 @@ pygettimeofday(_PyTime_timeval *tp, _Py_clock_info_t *info)
(void) GetSystemTimeAdjustment(&timeAdjustment, &timeIncrement,
&isTimeAdjustmentDisabled);
info->resolution = timeIncrement * 1e-7;
- if (isTimeAdjustmentDisabled)
- info->adjusted = 0;
- else
- info->adjusted = 1;
+ info->adjustable = 1;
}
#else
/* There are three ways to get the time:
@@ -71,7 +68,7 @@ pygettimeofday(_PyTime_timeval *tp, _Py_clock_info_t *info)
info->implementation = "gettimeofday()";
info->resolution = 1e-6;
info->monotonic = 0;
- info->adjusted = 1;
+ info->adjustable = 1;
}
return;
}
@@ -87,7 +84,7 @@ pygettimeofday(_PyTime_timeval *tp, _Py_clock_info_t *info)
info->implementation = "ftime()";
info->resolution = 1e-3;
info->monotonic = 0;
- info->adjusted = 1;
+ info->adjustable = 1;
}
}
#else /* !HAVE_FTIME */
@@ -97,7 +94,7 @@ pygettimeofday(_PyTime_timeval *tp, _Py_clock_info_t *info)
info->implementation = "time()";
info->resolution = 1.0;
info->monotonic = 0;
- info->adjusted = 1;
+ info->adjustable = 1;
}
#endif /* !HAVE_FTIME */