about summary refs log tree commit diff
path: root/absl/time/format_benchmark.cc
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2018-10-10T19·31-0700
committerCJ Johnson <johnsoncj@google.com>2018-10-10T19·35-0400
commitf340f773edab951656b19b6f1a77c964a78ec4c2 (patch)
treec42bf7faf49fb2355661c9f39c40513bc1ff2697 /absl/time/format_benchmark.cc
parent445998d7ac4e5d3c50411d377e3b50e960d2d6c2 (diff)
Export of internal Abseil changes.
--
906c47420646d510edd2479d5542c56f5fa31b65 by CJ Johnson <johnsoncj@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 216573923

--
74560d4afd2b605909e677c6fc3076049fb3010a by Eric Fiselier <ericwf@google.com>:

Avoid -Wformat-pedantic in benchmark.

PiperOrigin-RevId: 216523769

--
9bcc9da8b03e6d1ea43ee78931256c5541cb9686 by Eric Fiselier <ericwf@google.com>:

Delete unused CityHash functions.

PiperOrigin-RevId: 216464492

--
a42563b394c89fbb4c55cb5a6a5edbf96d271eea by Abseil Team <absl-team@google.com>:

Introduce new Abseil interfaces for converting between civil
times and absolute times.s

Deprecates absl::ConvertDateTime() and absl::FromDateTime().

PiperOrigin-RevId: 216424948

--
088e11235124267517d7f137854fa5554679c24f by Eric Fiselier <ericwf@google.com>:

Remove unneeded break statements in test.

PiperOrigin-RevId: 216403321
GitOrigin-RevId: 906c47420646d510edd2479d5542c56f5fa31b65
Change-Id: Idb44420be623e369c66f5a9c92bdc9ab46d3ec92
Diffstat (limited to 'absl/time/format_benchmark.cc')
-rw-r--r--absl/time/format_benchmark.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/absl/time/format_benchmark.cc b/absl/time/format_benchmark.cc
index ee53d71c6854..766f1b39a55b 100644
--- a/absl/time/format_benchmark.cc
+++ b/absl/time/format_benchmark.cc
@@ -38,7 +38,8 @@ void BM_Format_FormatTime(benchmark::State& state) {
   const absl::TimeZone lax =
       absl::time_internal::LoadTimeZone("America/Los_Angeles");
   const absl::Time t =
-      absl::FromDateTime(1977, 6, 28, 9, 8, 7, lax) + absl::Nanoseconds(1);
+      absl::FromCivil(absl::CivilSecond(1977, 6, 28, 9, 8, 7), lax) +
+      absl::Nanoseconds(1);
   while (state.KeepRunning()) {
     benchmark::DoNotOptimize(absl::FormatTime(fmt, t, lax).length());
   }
@@ -50,8 +51,8 @@ void BM_Format_ParseTime(benchmark::State& state) {
   state.SetLabel(fmt);
   const absl::TimeZone lax =
       absl::time_internal::LoadTimeZone("America/Los_Angeles");
-  absl::Time t =
-      absl::FromDateTime(1977, 6, 28, 9, 8, 7, lax) + absl::Nanoseconds(1);
+  absl::Time t = absl::FromCivil(absl::CivilSecond(1977, 6, 28, 9, 8, 7), lax) +
+                 absl::Nanoseconds(1);
   const std::string when = absl::FormatTime(fmt, t, lax);
   std::string err;
   while (state.KeepRunning()) {