summaryrefslogtreecommitdiff
path: root/zen/perf.h
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-10-11 15:17:59 +0000
committerB. Stack <bgstack15@gmail.com>2022-10-11 15:17:59 +0000
commit38c826621a39831d1bdc78aa9e45cc592db3e77f (patch)
treea49cfd729d9793681a57fa6f7409b0f0848e9ede /zen/perf.h
parentMerge branch 'b11.25' into 'master' (diff)
parentadd upstream 11.26 (diff)
downloadFreeFileSync-38c826621a39831d1bdc78aa9e45cc592db3e77f.tar.gz
FreeFileSync-38c826621a39831d1bdc78aa9e45cc592db3e77f.tar.bz2
FreeFileSync-38c826621a39831d1bdc78aa9e45cc592db3e77f.zip
Merge branch 'b11.26' into 'master'11.26
add upstream 11.26 See merge request opensource-tracking/FreeFileSync!49
Diffstat (limited to 'zen/perf.h')
-rw-r--r--zen/perf.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/zen/perf.h b/zen/perf.h
index 76c98c85..c3315717 100644
--- a/zen/perf.h
+++ b/zen/perf.h
@@ -96,14 +96,12 @@ public:
void showResult()
{
- const bool wasRunning = !watch_.isPaused();
- if (wasRunning) watch_.pause(); //don't include call to MessageBox()!
- ZEN_ON_SCOPE_EXIT(if (wasRunning) watch_.resume());
-
const int64_t timeMs = std::chrono::duration_cast<std::chrono::milliseconds>(watch_.elapsed()).count();
const std::string msg = numberTo<std::string>(timeMs) + " ms";
- std::clog << "Perf: duration: " << msg << '\n';
+ std::clog << "Perf: duration: " << msg + '\n';
resultShown_ = true;
+
+ watch_ = StopWatch(watch_.isPaused());
}
private:
bgstack15