summaryrefslogtreecommitdiff
path: root/absl/synchronization
diff options
context:
space:
mode:
Diffstat (limited to 'absl/synchronization')
-rw-r--r--absl/synchronization/internal/kernel_timeout.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/absl/synchronization/internal/kernel_timeout.cc b/absl/synchronization/internal/kernel_timeout.cc
index 4015bd0c..8d9e7d74 100644
--- a/absl/synchronization/internal/kernel_timeout.cc
+++ b/absl/synchronization/internal/kernel_timeout.cc
@@ -89,7 +89,7 @@ int64_t KernelTimeout::MakeAbsNanos() const {
int64_t nanos = RawNanos();
if (is_relative_timeout()) {
- int64_t now = ToUnixNanos(absl::Now());
+ int64_t now = absl::GetCurrentTimeNanos();
if (nanos > kMaxNanos - now) {
// Overflow.
nanos = kMaxNanos;
@@ -118,7 +118,7 @@ struct timespec KernelTimeout::MakeRelativeTimespec() const {
}
int64_t nanos = RawNanos();
- int64_t now = ToUnixNanos(absl::Now());
+ int64_t now = absl::GetCurrentTimeNanos();
if (now > nanos) {
// Convert past values to 0 to be safe.
nanos = 0;
@@ -146,7 +146,7 @@ KernelTimeout::DWord KernelTimeout::InMillisecondsFromNow() const {
return static_cast<DWord>(ms);
}
- int64_t now = ToUnixNanos(absl::Now());
+ int64_t now = absl::GetCurrentTimeNanos();
if (nanos >= now) {
// Round up so that now + ms_from_now >= nanos.
constexpr uint64_t kMaxValueNanos =