diff options
author | 2015-09-10 22:19:25 -0700 | |
---|---|---|
committer | 2015-09-10 22:19:25 -0700 | |
commit | ebc7ef268ca9536af6a4c5be1c80bcc79665d4e9 (patch) | |
tree | 7d45e728a6ac143c45c667292d7eb068e2e44870 /src/core/support/time_posix.c | |
parent | 6b8046375e15702493094598803c22ed3b8e1e65 (diff) |
Mac build fixes
Diffstat (limited to 'src/core/support/time_posix.c')
-rw-r--r-- | src/core/support/time_posix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/support/time_posix.c b/src/core/support/time_posix.c index a274400243..dcecff0d05 100644 --- a/src/core/support/time_posix.c +++ b/src/core/support/time_posix.c @@ -108,8 +108,8 @@ gpr_timespec gpr_now(gpr_clock_type clock) { break; case GPR_CLOCK_MONOTONIC: now_dbl = (mach_absolute_time() - g_time_start) * g_time_scale; - now.tv_sec = now_dbl * 1e-9; - now.tv_nsec = now_dbl - now.tv_sec * 1e9; + now.tv_sec = (time_t)(now_dbl * 1e-9); + now.tv_nsec = (int)(now_dbl - ((double)now.tv_sec) * 1e9); break; case GPR_CLOCK_PRECISE: gpr_precise_clock_now(&now); |