diff options
author | Haibo Huang <hhb@google.com> | 2021-01-06 20:08:02 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-01-06 20:08:02 +0000 |
commit | 41d0734a4c05e216bfa34fc196b485cdad7542db (patch) | |
tree | 513469510165f91c179052d3f349b964d1f299dd /include/benchmark/benchmark.h | |
parent | b58434a98b6f74fea0c266184e3391b6c218cd91 (diff) | |
parent | e2bbc604028696d3c712f29a7f660ff3038c5aa1 (diff) | |
download | google-benchmark-41d0734a4c05e216bfa34fc196b485cdad7542db.tar.gz |
Upgrade google-benchmark to 8df87f6c879cbcabd17c5cfcec7b89687df36953 am: 531a954c39 am: bfd38e0397 am: e2bbc60402
Original change: https://android-review.googlesource.com/c/platform/external/google-benchmark/+/1540708
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I4b98c4ca52ad70d7a28be386f76188901aef5a04
Diffstat (limited to 'include/benchmark/benchmark.h')
-rw-r--r-- | include/benchmark/benchmark.h | 6 |
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: |