diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-07-14 06:55:47 -0700 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-07-14 06:55:47 -0700 |
commit | 21038ce1d4f09ad0f4cb9a1d42c40928265d0ae3 (patch) | |
tree | 9e3612500b6c461469ce7aad14b51b840f188285 /src | |
parent | 677c50c92a89870c479230d03fa4a93109310906 (diff) |
Mac, Windows support for new timespec
Diffstat (limited to 'src')
-rw-r--r-- | src/core/support/time_posix.c | 1 | ||||
-rw-r--r-- | src/core/support/time_win32.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/core/support/time_posix.c b/src/core/support/time_posix.c index f28c2d7b78..258b2e640e 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 fa77c74eeb..238cd07ebc 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); |