diff options
author | 2015-09-15 15:20:26 -0700 | |
---|---|---|
committer | 2015-09-15 15:20:26 -0700 | |
commit | fd2f7331fa97f735879a8759ac9fc8591969011b (patch) | |
tree | da031f982ee5d1d21fd71e6c4bc9d80365c7d6e2 /src/core/support/time_posix.c | |
parent | 1928d496a237c3850365e2557ae41ae73125fc80 (diff) | |
parent | 9ed4be48955e3b65b0540f70060b7191d8c1eef1 (diff) |
Merge branch 'master' of github.com:grpc/grpc into core_creds_plugin
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); |