diff options
Diffstat (limited to 'absl/synchronization/internal/kernel_timeout.h')
-rw-r--r-- | absl/synchronization/internal/kernel_timeout.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/absl/synchronization/internal/kernel_timeout.h b/absl/synchronization/internal/kernel_timeout.h index 4e361a6a..06404a75 100644 --- a/absl/synchronization/internal/kernel_timeout.h +++ b/absl/synchronization/internal/kernel_timeout.h @@ -128,6 +128,11 @@ class KernelTimeout { // case of a spurious wakeup. std::chrono::nanoseconds ToChronoDuration() const; + // Returns true if steady (aka monotonic) clocks are supported by the system. + // This method exists because go/btm requires synchronized clocks, and + // thus requires we use the system (aka walltime) clock. + static constexpr bool SupportsSteadyClock() { return true; } + private: // Returns the current time, expressed as a count of nanoseconds since the // epoch used by an arbitrary clock. The implementation tries to use a steady |