diff --git a/src/core/support/time_posix.c b/src/core/support/time_posix.c index f28c2d7b78f..258b2e640e9 100644 --- a/src/core/support/time_posix.c +++ b/src/core/support/time_posix.c @@ -92,6 +92,7 @@ gpr_timespec gpr_now(gpr_clock_type clock) { struct timeval now_tv; double now_dbl; + now.clock_type = clock; switch (clock) { case GPR_CLOCK_REALTIME: gettimeofday(&now_tv, NULL); diff --git a/src/core/support/time_win32.c b/src/core/support/time_win32.c index fa77c74eeb1..238cd07ebc7 100644 --- a/src/core/support/time_win32.c +++ b/src/core/support/time_win32.c @@ -55,6 +55,7 @@ gpr_timespec gpr_now(gpr_clock_type clock) { struct _timeb now_tb; LARGE_INTEGER timestamp; double now_dbl; + now_tv.clock_type = clock; switch (clock) { case GPR_CLOCK_REALTIME: _ftime_s(&now_tb);