diff options
author | 2017-11-09 21:00:59 -0800 | |
---|---|---|
committer | 2017-11-09 21:00:59 -0800 | |
commit | 830c14ff9b32cd83eae48f239b0009b3b0045ddd (patch) | |
tree | 0f4104bd25455b1c3782c5c1b37d112226e4cb18 /src/core/lib/iomgr/timer_manager.cc | |
parent | c03867ff224a98dab5a93b3ba70b95c46f05a440 (diff) |
Add realtime clock sync every 10s
Diffstat (limited to 'src/core/lib/iomgr/timer_manager.cc')
-rw-r--r-- | src/core/lib/iomgr/timer_manager.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/timer_manager.cc b/src/core/lib/iomgr/timer_manager.cc index 16e9e7e707..6814bcd1ce 100644 --- a/src/core/lib/iomgr/timer_manager.cc +++ b/src/core/lib/iomgr/timer_manager.cc @@ -224,7 +224,11 @@ static bool wait_until(grpc_exec_ctx* exec_ctx, grpc_millis next) { static void timer_main_loop(grpc_exec_ctx* exec_ctx) { for (;;) { grpc_millis next = GRPC_MILLIS_INF_FUTURE; + // Check if it is time to update g_start_time + grpc_exec_ctx_maybe_update_start_time(exec_ctx); + grpc_exec_ctx_invalidate_now(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: |