aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp/util/time.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpp/util/time.cc')
-rw-r--r--src/cpp/util/time.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cpp/util/time.cc b/src/cpp/util/time.cc
index 6157a37745..9c38b34879 100644
--- a/src/cpp/util/time.cc
+++ b/src/cpp/util/time.cc
@@ -57,8 +57,8 @@ void Timepoint2Timespec(const system_clock::time_point& from,
return;
}
nanoseconds nsecs = duration_cast<nanoseconds>(deadline - secs);
- to->tv_sec = (time_t)secs.count();
- to->tv_nsec = (int)nsecs.count();
+ to->tv_sec = (gpr_int64)secs.count();
+ to->tv_nsec = (gpr_int32)nsecs.count();
to->clock_type = GPR_CLOCK_REALTIME;
}
@@ -73,8 +73,8 @@ void TimepointHR2Timespec(const high_resolution_clock::time_point& from,
return;
}
nanoseconds nsecs = duration_cast<nanoseconds>(deadline - secs);
- to->tv_sec = (time_t)secs.count();
- to->tv_nsec = (int)nsecs.count();
+ to->tv_sec = (gpr_int64)secs.count();
+ to->tv_nsec = (gpr_int32)nsecs.count();
to->clock_type = GPR_CLOCK_REALTIME;
}