summaryrefslogtreecommitdiff
path: root/zen/perf.h
diff options
context:
space:
mode:
Diffstat (limited to 'zen/perf.h')
-rwxr-xr-xzen/perf.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/zen/perf.h b/zen/perf.h
index 2006bdab..40b6533d 100755
--- a/zen/perf.h
+++ b/zen/perf.h
@@ -8,8 +8,8 @@
#define PERF_H_83947184145342652456
#include <chrono>
-#include "deprecate.h"
#include "scope_guard.h"
+#include "string_tools.h"
#include <iostream>
@@ -31,7 +31,7 @@ namespace zen
class PerfTimer
{
public:
- ZEN_DEPRECATE PerfTimer() {}
+ [[deprecated]] PerfTimer() {}
~PerfTimer() { if (!resultShown_) showResult(); }
@@ -75,7 +75,8 @@ public:
if (wasRunning) pause(); //don't include call to MessageBox()!
ZEN_ON_SCOPE_EXIT(if (wasRunning) resume());
- std::clog << "Perf: duration: " << timeMs() << " ms\n";
+ const std::string msg = numberTo<std::string>(timeMs()) + " ms";
+ std::clog << "Perf: duration: " << msg << "\n";
resultShown_ = true;
}
bgstack15