|
|
|
@ -53,13 +53,6 @@ static void exec_ctx_sched(grpc_closure* closure, grpc_error* error) { |
|
|
|
|
|
|
|
|
|
static gpr_timespec g_start_time; |
|
|
|
|
|
|
|
|
|
// For debug of the timer manager crash only.
|
|
|
|
|
// TODO (mxyan): remove after bug is fixed.
|
|
|
|
|
#ifdef GRPC_DEBUG_TIMER_MANAGER |
|
|
|
|
extern int64_t g_start_time_sec; |
|
|
|
|
extern int64_t g_start_time_nsec; |
|
|
|
|
#endif // GRPC_DEBUG_TIMER_MANAGER
|
|
|
|
|
|
|
|
|
|
static grpc_millis timespec_to_millis_round_down(gpr_timespec ts) { |
|
|
|
|
ts = gpr_time_sub(ts, g_start_time); |
|
|
|
|
double x = GPR_MS_PER_SEC * static_cast<double>(ts.tv_sec) + |
|
|
|
@ -125,12 +118,6 @@ void ExecCtx::TestOnlyGlobalInit(gpr_timespec new_val) { |
|
|
|
|
|
|
|
|
|
void ExecCtx::GlobalInit(void) { |
|
|
|
|
g_start_time = gpr_now(GPR_CLOCK_MONOTONIC); |
|
|
|
|
// For debug of the timer manager crash only.
|
|
|
|
|
// TODO (mxyan): remove after bug is fixed.
|
|
|
|
|
#ifdef GRPC_DEBUG_TIMER_MANAGER |
|
|
|
|
g_start_time_sec = g_start_time.tv_sec; |
|
|
|
|
g_start_time_nsec = g_start_time.tv_nsec; |
|
|
|
|
#endif |
|
|
|
|
gpr_tls_init(&exec_ctx_); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|