aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/timer_manager.cc
diff options
context:
space:
mode:
authorGravatar Sree Kuchibhotla <sreek@google.com>2017-12-04 12:50:27 -0800
committerGravatar Sree Kuchibhotla <sreek@google.com>2017-12-04 12:50:27 -0800
commit54961bb9e16f84d193077277f7d2d8269f57a411 (patch)
treecaa96fab34b4c9e7e665ab11fdcd8642fd4985a1 /src/core/lib/iomgr/timer_manager.cc
parent2e3061c25e4d7b53b07bb30c79903981a197359e (diff)
Change the code to use MONOTONIC clocks when calling gpr_cv_wait (condition varialbes in linux support MONOTONIC clock type)
Diffstat (limited to 'src/core/lib/iomgr/timer_manager.cc')
-rw-r--r--src/core/lib/iomgr/timer_manager.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/lib/iomgr/timer_manager.cc b/src/core/lib/iomgr/timer_manager.cc
index dac74aea24..b68088e4bd 100644
--- a/src/core/lib/iomgr/timer_manager.cc
+++ b/src/core/lib/iomgr/timer_manager.cc
@@ -193,7 +193,7 @@ static bool wait_until(grpc_exec_ctx* exec_ctx, grpc_millis next) {
}
gpr_cv_wait(&g_cv_wait, &g_mu,
- grpc_millis_to_timespec(next, GPR_CLOCK_REALTIME));
+ grpc_millis_to_timespec(next, GPR_CLOCK_MONOTONIC));
if (grpc_timer_check_trace.enabled()) {
gpr_log(GPR_DEBUG, "wait ended: was_timed:%d kicked:%d",
@@ -319,7 +319,7 @@ static void stop_threads(void) {
gpr_log(GPR_DEBUG, "num timer threads: %d", g_thread_count);
}
while (g_thread_count > 0) {
- gpr_cv_wait(&g_cv_shutdown, &g_mu, gpr_inf_future(GPR_CLOCK_REALTIME));
+ gpr_cv_wait(&g_cv_shutdown, &g_mu, gpr_inf_future(GPR_CLOCK_MONOTONIC));
if (grpc_timer_check_trace.enabled()) {
gpr_log(GPR_DEBUG, "num timer threads: %d", g_thread_count);
}