aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/support
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-09-14 09:29:36 -0700
committerGravatar GitHub <noreply@github.com>2016-09-14 09:29:36 -0700
commit22f39f52ef90f0a071fac39ad847fbbab0182e40 (patch)
tree9110598361bd743ef2b21ceb0ba865a854816516 /src/core/lib/support
parenta51f54192acbc5eb45f6a10da8b33cbd4c4f8b97 (diff)
parentabc1a4414d7ca8d94ddeec884aa4c4a85fd513ff (diff)
Merge pull request #7980 from thinkerou/fix_time_posix_conv
Fix time posix convert
Diffstat (limited to 'src/core/lib/support')
-rw-r--r--src/core/lib/support/time_posix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/lib/support/time_posix.c b/src/core/lib/support/time_posix.c
index 11542072fe..a69c501e9f 100644
--- a/src/core/lib/support/time_posix.c
+++ b/src/core/lib/support/time_posix.c
@@ -127,7 +127,7 @@ static gpr_timespec now_impl(gpr_clock_type clock) {
now.tv_nsec = now_tv.tv_usec * 1000;
break;
case GPR_CLOCK_MONOTONIC:
- now_dbl = (mach_absolute_time() - g_time_start) * g_time_scale;
+ now_dbl = ((double)(mach_absolute_time() - g_time_start)) * g_time_scale;
now.tv_sec = (int64_t)(now_dbl * 1e-9);
now.tv_nsec = (int32_t)(now_dbl - ((double)now.tv_sec) * 1e9);
break;