|
|
@ -57,8 +57,8 @@ void Timepoint2Timespec(const system_clock::time_point& from, |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
nanoseconds nsecs = duration_cast<nanoseconds>(deadline - secs); |
|
|
|
nanoseconds nsecs = duration_cast<nanoseconds>(deadline - secs); |
|
|
|
to->tv_sec = secs.count(); |
|
|
|
to->tv_sec = (time_t)secs.count(); |
|
|
|
to->tv_nsec = nsecs.count(); |
|
|
|
to->tv_nsec = (int)nsecs.count(); |
|
|
|
to->clock_type = GPR_CLOCK_REALTIME; |
|
|
|
to->clock_type = GPR_CLOCK_REALTIME; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -73,8 +73,8 @@ void TimepointHR2Timespec(const high_resolution_clock::time_point& from, |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
nanoseconds nsecs = duration_cast<nanoseconds>(deadline - secs); |
|
|
|
nanoseconds nsecs = duration_cast<nanoseconds>(deadline - secs); |
|
|
|
to->tv_sec = secs.count(); |
|
|
|
to->tv_sec = (time_t)secs.count(); |
|
|
|
to->tv_nsec = nsecs.count(); |
|
|
|
to->tv_nsec = (int)nsecs.count(); |
|
|
|
to->clock_type = GPR_CLOCK_REALTIME; |
|
|
|
to->clock_type = GPR_CLOCK_REALTIME; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|