aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/timer_manager.cc
diff options
context:
space:
mode:
authorGravatar Sree Kuchibhotla <sreek@google.com>2017-11-16 21:35:54 -0800
committerGravatar Sree Kuchibhotla <sreek@google.com>2017-11-17 09:44:07 -0800
commit9f4759ac144db54c638a7dc9d1c1ee7ba6208c7a (patch)
tree11dd8cc749a8c625a40a8274e3329bbd34c0b3cd /src/core/lib/iomgr/timer_manager.cc
parentd9186a7e9ddce582861a8adab89d6ac58da7eb41 (diff)
Disable caching start-time for all clocktypes except GPR_CLOCK_MONOTONIC
Caching the start-time for GPR_CLOCK_REALTIME has been causing errors in cases where the system time is changed (after caching the time). In such cases, the following functions produce incorrect results (and are off by how much ever the system time was changed) grpc_millis_to_timespec() and grpc_timespec_to_millis_round_down() This can cause problems especially when using the above functions to get timer deadlines or completion queue timeouts. (In the worst case scenarios, the timeouts/deadlines will always occur (if the timeout inverval / deadline was less than the system change delta) Ideally we should be reverting https://github.com/grpc/grpc/pull/11866 but since that is a large change (which introduced new APIs in exec_ctx.cc), I am doing this change to effectively revert to the old behavior (while still keeping the new APIs introduced in exec_ctx)
Diffstat (limited to 'src/core/lib/iomgr/timer_manager.cc')
-rw-r--r--src/core/lib/iomgr/timer_manager.cc4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/core/lib/iomgr/timer_manager.cc b/src/core/lib/iomgr/timer_manager.cc
index acc40b6c9e..163c9b5211 100644
--- a/src/core/lib/iomgr/timer_manager.cc
+++ b/src/core/lib/iomgr/timer_manager.cc
@@ -226,10 +226,6 @@ static void timer_main_loop(grpc_exec_ctx* exec_ctx) {
grpc_millis next = GRPC_MILLIS_INF_FUTURE;
grpc_exec_ctx_invalidate_now(exec_ctx);
- /* Calibrate g_start_time in exec_ctx.cc with a regular interval in case the
- * system clock has changed */
- grpc_exec_ctx_maybe_update_start_time(exec_ctx);
-
// check timer state, updates next to the next time to run a check
switch (grpc_timer_check(exec_ctx, &next)) {
case GRPC_TIMERS_FIRED: