aboutsummaryrefslogtreecommitdiff
path: root/include/benchmark/benchmark.h
diff options
context:
space:
mode:
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: