|
|
@ -127,7 +127,7 @@ static gpr_timespec now_impl(gpr_clock_type clock) { |
|
|
|
now.tv_nsec = now_tv.tv_usec * 1000; |
|
|
|
now.tv_nsec = now_tv.tv_usec * 1000; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case GPR_CLOCK_MONOTONIC: |
|
|
|
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_sec = (int64_t)(now_dbl * 1e-9); |
|
|
|
now.tv_nsec = (int32_t)(now_dbl - ((double)now.tv_sec) * 1e9); |
|
|
|
now.tv_nsec = (int32_t)(now_dbl - ((double)now.tv_sec) * 1e9); |
|
|
|
break; |
|
|
|
break; |
|
|
|