summaryrefslogtreecommitdiff
path: root/absl/time/clock.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/time/clock.cc')
-rw-r--r--absl/time/clock.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/absl/time/clock.cc b/absl/time/clock.cc
index 772f8525..3b1e8739 100644
--- a/absl/time/clock.cc
+++ b/absl/time/clock.cc
@@ -34,6 +34,7 @@
#include "absl/base/thread_annotations.h"
namespace absl {
+inline namespace lts_2018_06_20 {
Time Now() {
// TODO(bww): Get a timespec instead so we don't have to divide.
int64_t n = absl::GetCurrentTimeNanos();
@@ -43,6 +44,7 @@ Time Now() {
}
return time_internal::FromUnixDuration(absl::Nanoseconds(n));
}
+} // inline namespace lts_2018_06_20
} // namespace absl
// Decide if we should use the fast GetCurrentTimeNanos() algorithm
@@ -73,9 +75,11 @@ Time Now() {
#if !ABSL_USE_CYCLECLOCK_FOR_GET_CURRENT_TIME_NANOS
namespace absl {
+inline namespace lts_2018_06_20 {
int64_t GetCurrentTimeNanos() {
return GET_CURRENT_TIME_NANOS_FROM_SYSTEM();
}
+} // inline namespace lts_2018_06_20
} // namespace absl
#else // Use the cyclecounter-based implementation below.
@@ -93,6 +97,7 @@ static int64_t stats_slow_paths;
static int64_t stats_fast_slow_paths;
namespace absl {
+inline namespace lts_2018_06_20 {
namespace time_internal {
// This is a friend wrapper around UnscaledCycleClock::Now()
// (needed to access UnscaledCycleClock).
@@ -517,10 +522,12 @@ static uint64_t UpdateLastSample(uint64_t now_cycles, uint64_t now_ns,
return estimated_base_ns;
}
+} // inline namespace lts_2018_06_20
} // namespace absl
#endif // ABSL_USE_CYCLECLOCK_FOR_GET_CURRENT_TIME_NANOS
namespace absl {
+inline namespace lts_2018_06_20 {
namespace {
// Returns the maximum duration that SleepOnce() can sleep for.
@@ -548,6 +555,7 @@ void SleepOnce(absl::Duration to_sleep) {
}
} // namespace
+} // inline namespace lts_2018_06_20
} // namespace absl
extern "C" {