aboutsummaryrefslogtreecommitdiff
path: root/include/benchmark/benchmark.h
diff options
context:
space:
mode:
authorHaibo Huang <hhb@google.com>2021-01-06 19:15:48 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-01-06 19:15:48 +0000
commitbfd38e0397a3decd5c6c21eef0ac377818226f7d (patch)
tree513469510165f91c179052d3f349b964d1f299dd /include/benchmark/benchmark.h
parented5d9467b7589c8b2a645fe8d6d6b4f499f3e2c1 (diff)
parent531a954c39b1d1921adcd462fe6d6ccf1f371d84 (diff)
downloadgoogle-benchmark-bfd38e0397a3decd5c6c21eef0ac377818226f7d.tar.gz
Upgrade google-benchmark to 8df87f6c879cbcabd17c5cfcec7b89687df36953 am: 531a954c39
Original change: https://android-review.googlesource.com/c/platform/external/google-benchmark/+/1540708 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I2cdf4857a8d48054fcdfdf4459428d149b126951
Diffstat (limited to 'include/benchmark/benchmark.h')
-rw-r--r--include/benchmark/benchmark.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/benchmark/benchmark.h b/include/benchmark/benchmark.h
index 834687e..f57e3e7 100644
--- a/include/benchmark/benchmark.h
+++ b/include/benchmark/benchmark.h
@@ -407,7 +407,7 @@ typedef std::map<std::string, Counter> UserCounters;
// TimeUnit is passed to a benchmark in order to specify the order of magnitude
// for the measured time.
-enum TimeUnit { kNanosecond, kMicrosecond, kMillisecond };
+enum TimeUnit { kNanosecond, kMicrosecond, kMillisecond, kSecond };
// BigO is passed to a benchmark in order to specify the asymptotic
// computational
@@ -1577,6 +1577,8 @@ class MemoryManager {
inline const char* GetTimeUnitString(TimeUnit unit) {
switch (unit) {
+ case kSecond:
+ return "s";
case kMillisecond:
return "ms";
case kMicrosecond:
@@ -1589,6 +1591,8 @@ inline const char* GetTimeUnitString(TimeUnit unit) {
inline double GetTimeUnitMultiplier(TimeUnit unit) {
switch (unit) {
+ case kSecond:
+ return 1;
case kMillisecond:
return 1e3;
case kMicrosecond: