summaryrefslogtreecommitdiffstats
path: root/Modules/_threadmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_threadmodule.c')
-rw-r--r--Modules/_threadmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_threadmodule.c b/Modules/_threadmodule.c
index b68c177..8f59e03 100644
--- a/Modules/_threadmodule.c
+++ b/Modules/_threadmodule.c
@@ -57,7 +57,7 @@ acquire_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds)
if (microseconds > 0) {
- _PyTime_gettimeofday(&endtime);
+ _PyTime_monotonic(&endtime);
endtime.tv_sec += microseconds / (1000 * 1000);
endtime.tv_usec += microseconds % (1000 * 1000);
}
@@ -83,7 +83,7 @@ acquire_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds)
/* If we're using a timeout, recompute the timeout after processing
* signals, since those can take time. */
if (microseconds > 0) {
- _PyTime_gettimeofday(&curtime);
+ _PyTime_monotonic(&curtime);
microseconds = ((endtime.tv_sec - curtime.tv_sec) * 1000000 +
(endtime.tv_usec - curtime.tv_usec));