diff options
Diffstat (limited to 'src/node/ext/timeval.cc')
-rw-r--r-- | src/node/ext/timeval.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/node/ext/timeval.cc b/src/node/ext/timeval.cc index bc3237f7a6..60de4d816d 100644 --- a/src/node/ext/timeval.cc +++ b/src/node/ext/timeval.cc @@ -42,18 +42,19 @@ namespace node { gpr_timespec MillisecondsToTimespec(double millis) { if (millis == std::numeric_limits<double>::infinity()) { - return gpr_inf_future; + return gpr_inf_future(GPR_CLOCK_REALTIME); } else if (millis == -std::numeric_limits<double>::infinity()) { - return gpr_inf_past; + return gpr_inf_past(GPR_CLOCK_REALTIME); } else { - return gpr_time_from_micros(static_cast<int64_t>(millis * 1000)); + return gpr_time_from_micros(static_cast<int64_t>(millis * 1000), + GPR_CLOCK_REALTIME); } } double TimespecToMilliseconds(gpr_timespec timespec) { - if (gpr_time_cmp(timespec, gpr_inf_future) == 0) { + if (gpr_time_cmp(timespec, gpr_inf_future(GPR_CLOCK_REALTIME)) == 0) { return std::numeric_limits<double>::infinity(); - } else if (gpr_time_cmp(timespec, gpr_inf_past) == 0) { + } else if (gpr_time_cmp(timespec, gpr_inf_past(GPR_CLOCK_REALTIME)) == 0) { return -std::numeric_limits<double>::infinity(); } else { return (static_cast<double>(timespec.tv_sec) * 1000 + |