about summary refs log tree commit diff
path: root/absl/time
diff options
context:
space:
mode:
Diffstat (limited to 'absl/time')
-rw-r--r--absl/time/civil_time.cc2
-rw-r--r--absl/time/civil_time.h2
-rw-r--r--absl/time/clock.cc8
-rw-r--r--absl/time/clock.h2
-rw-r--r--absl/time/duration.cc2
-rw-r--r--absl/time/duration_test.cc5
-rw-r--r--absl/time/format.cc2
-rw-r--r--absl/time/internal/get_current_time_chrono.inc2
-rw-r--r--absl/time/internal/get_current_time_posix.inc2
-rw-r--r--absl/time/internal/test_util.cc4
-rw-r--r--absl/time/internal/test_util.h2
-rw-r--r--absl/time/time.cc2
-rw-r--r--absl/time/time.h2
13 files changed, 32 insertions, 5 deletions
diff --git a/absl/time/civil_time.cc b/absl/time/civil_time.cc
index 7b86fa8bb28f..ada82cbc8d01 100644
--- a/absl/time/civil_time.cc
+++ b/absl/time/civil_time.cc
@@ -21,6 +21,7 @@
 #include "absl/time/time.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 
 namespace {
 
@@ -170,4 +171,5 @@ std::ostream& operator<<(std::ostream& os, CivilSecond s) {
 
 }  // namespace time_internal
 
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/time/civil_time.h b/absl/time/civil_time.h
index 77c3be2eba6b..bb4600443445 100644
--- a/absl/time/civil_time.h
+++ b/absl/time/civil_time.h
@@ -76,6 +76,7 @@
 #include "absl/time/internal/cctz/include/cctz/civil_time.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 
 namespace time_internal {
 struct second_tag : cctz::detail::second_tag {};
@@ -531,6 +532,7 @@ std::ostream& operator<<(std::ostream& os, CivilSecond s);
 
 }  // namespace time_internal
 
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_TIME_CIVIL_TIME_H_
diff --git a/absl/time/clock.cc b/absl/time/clock.cc
index bc6f5ccf2763..9e9a0386e52b 100644
--- a/absl/time/clock.cc
+++ b/absl/time/clock.cc
@@ -34,6 +34,7 @@
 #include "absl/base/thread_annotations.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 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));
 }
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 // Decide if we should use the fast GetCurrentTimeNanos() algorithm
@@ -71,9 +73,11 @@ Time Now() {
 
 #if !ABSL_USE_CYCLECLOCK_FOR_GET_CURRENT_TIME_NANOS
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 int64_t GetCurrentTimeNanos() {
   return GET_CURRENT_TIME_NANOS_FROM_SYSTEM();
 }
+ABSL_NAMESPACE_END
 }  // namespace absl
 #else  // Use the cyclecounter-based implementation below.
 
@@ -91,6 +95,7 @@ static int64_t stats_slow_paths;
 static int64_t stats_fast_slow_paths;
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace time_internal {
 // This is a friend wrapper around UnscaledCycleClock::Now()
 // (needed to access UnscaledCycleClock).
@@ -515,10 +520,12 @@ static uint64_t UpdateLastSample(uint64_t now_cycles, uint64_t now_ns,
 
   return estimated_base_ns;
 }
+ABSL_NAMESPACE_END
 }  // namespace absl
 #endif  // ABSL_USE_CYCLECLOCK_FOR_GET_CURRENT_TIME_NANOS
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace {
 
 // Returns the maximum duration that SleepOnce() can sleep for.
@@ -546,6 +553,7 @@ void SleepOnce(absl::Duration to_sleep) {
 }
 
 }  // namespace
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 extern "C" {
diff --git a/absl/time/clock.h b/absl/time/clock.h
index bb52e4f6ca99..27764a922d5e 100644
--- a/absl/time/clock.h
+++ b/absl/time/clock.h
@@ -26,6 +26,7 @@
 #include "absl/time/time.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 
 // Now()
 //
@@ -49,6 +50,7 @@ int64_t GetCurrentTimeNanos();
 // * Returns immediately when passed a nonpositive duration.
 void SleepFor(absl::Duration duration);
 
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 // -----------------------------------------------------------------------------
diff --git a/absl/time/duration.cc b/absl/time/duration.cc
index f0b4631d6fa9..b1af84061a8b 100644
--- a/absl/time/duration.cc
+++ b/absl/time/duration.cc
@@ -71,6 +71,7 @@
 #include "absl/time/time.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 
 namespace {
 
@@ -917,4 +918,5 @@ bool ParseFlag(const std::string& text, Duration* dst, std::string* ) {
 
 std::string UnparseFlag(Duration d) { return FormatDuration(d); }
 
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/time/duration_test.cc b/absl/time/duration_test.cc
index 5dce9ac8a557..49ebd1182ac5 100644
--- a/absl/time/duration_test.cc
+++ b/absl/time/duration_test.cc
@@ -762,11 +762,6 @@ TEST(Duration, DivisionByZero) {
   const double dbl_inf = std::numeric_limits<double>::infinity();
   const double dbl_denorm = std::numeric_limits<double>::denorm_min();
 
-  // IEEE 754 behavior
-  double z = 0.0, two = 2.0;
-  EXPECT_TRUE(std::isinf(two / z));
-  EXPECT_TRUE(std::isnan(z / z));  // We'll return inf
-
   // Operator/(Duration, double)
   EXPECT_EQ(inf, zero / 0.0);
   EXPECT_EQ(-inf, zero / -0.0);
diff --git a/absl/time/format.cc b/absl/time/format.cc
index ebe872cf7402..5997ef0c220f 100644
--- a/absl/time/format.cc
+++ b/absl/time/format.cc
@@ -22,6 +22,7 @@
 namespace cctz = absl::time_internal::cctz;
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 
 extern const char RFC3339_full[] = "%Y-%m-%dT%H:%M:%E*S%Ez";
 extern const char RFC3339_sec[] =  "%Y-%m-%dT%H:%M:%S%Ez";
@@ -145,4 +146,5 @@ std::string UnparseFlag(absl::Time t) {
   return absl::FormatTime(RFC3339_full, t, absl::UTCTimeZone());
 }
 
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/time/internal/get_current_time_chrono.inc b/absl/time/internal/get_current_time_chrono.inc
index 5180230dee58..5eeb6406aaf3 100644
--- a/absl/time/internal/get_current_time_chrono.inc
+++ b/absl/time/internal/get_current_time_chrono.inc
@@ -16,6 +16,7 @@
 #include <cstdint>
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace time_internal {
 
 static int64_t GetCurrentTimeNanosFromSystem() {
@@ -26,4 +27,5 @@ static int64_t GetCurrentTimeNanosFromSystem() {
 }
 
 }  // namespace time_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/time/internal/get_current_time_posix.inc b/absl/time/internal/get_current_time_posix.inc
index 65474ca6da1e..42072000ae3c 100644
--- a/absl/time/internal/get_current_time_posix.inc
+++ b/absl/time/internal/get_current_time_posix.inc
@@ -7,6 +7,7 @@
 #include "absl/base/internal/raw_logging.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace time_internal {
 
 static int64_t GetCurrentTimeNanosFromSystem() {
@@ -19,4 +20,5 @@ static int64_t GetCurrentTimeNanosFromSystem() {
 }
 
 }  // namespace time_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/time/internal/test_util.cc b/absl/time/internal/test_util.cc
index fbddbb733698..9bffe121da69 100644
--- a/absl/time/internal/test_util.cc
+++ b/absl/time/internal/test_util.cc
@@ -24,6 +24,7 @@
 namespace cctz = absl::time_internal::cctz;
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace time_internal {
 
 TimeZone LoadTimeZone(const std::string& name) {
@@ -33,9 +34,11 @@ TimeZone LoadTimeZone(const std::string& name) {
 }
 
 }  // namespace time_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace time_internal {
 namespace cctz_extension {
 namespace {
@@ -123,4 +126,5 @@ ZoneInfoSourceFactory zone_info_source_factory = TestFactory;
 
 }  // namespace cctz_extension
 }  // namespace time_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/time/internal/test_util.h b/absl/time/internal/test_util.h
index d7319ea8f5bb..5c4bf1f680ee 100644
--- a/absl/time/internal/test_util.h
+++ b/absl/time/internal/test_util.h
@@ -20,12 +20,14 @@
 #include "absl/time/time.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace time_internal {
 
 // Loads the named timezone, but dies on any failure.
 absl::TimeZone LoadTimeZone(const std::string& name);
 
 }  // namespace time_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_TIME_INTERNAL_TEST_UTIL_H_
diff --git a/absl/time/time.cc b/absl/time/time.cc
index 60382be7b801..6bb36cb3e7ca 100644
--- a/absl/time/time.cc
+++ b/absl/time/time.cc
@@ -47,6 +47,7 @@
 namespace cctz = absl::time_internal::cctz;
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 
 namespace {
 
@@ -494,4 +495,5 @@ struct tm ToTM(absl::Time t, absl::TimeZone tz) {
   return tm;
 }
 
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/time/time.h b/absl/time/time.h
index be0648134efd..7507b0cd4080 100644
--- a/absl/time/time.h
+++ b/absl/time/time.h
@@ -89,6 +89,7 @@ struct timeval;
 #include "absl/time/internal/cctz/include/cctz/time_zone.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 
 class Duration;  // Defined below
 class Time;      // Defined below
@@ -1574,6 +1575,7 @@ constexpr Time FromTimeT(time_t t) {
   return time_internal::FromUnixDuration(Seconds(t));
 }
 
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_TIME_TIME_H_