diff options
author | Daniel Wilhelm <shieldwed@outlook.com> | 2018-06-30 12:43:08 +0200 |
---|---|---|
committer | Daniel Wilhelm <shieldwed@outlook.com> | 2018-06-30 12:43:08 +0200 |
commit | a98326eb2954ac1e79f5eac28dbeab3ec15e047f (patch) | |
tree | bb16257a1894b488e365851273735ec13a9442ef /zen/perf.h | |
parent | 10.0 (diff) | |
download | FreeFileSync-a98326eb2954ac1e79f5eac28dbeab3ec15e047f.tar.gz FreeFileSync-a98326eb2954ac1e79f5eac28dbeab3ec15e047f.tar.bz2 FreeFileSync-a98326eb2954ac1e79f5eac28dbeab3ec15e047f.zip |
10.1
Diffstat (limited to 'zen/perf.h')
-rwxr-xr-x | zen/perf.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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; } |