From cab22f2dc3c5f41b5163f74cbb233e390edff6ff Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Tue, 11 Oct 2022 11:16:39 -0400 Subject: add upstream 11.26 --- zen/perf.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'zen/perf.h') 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(watch_.elapsed()).count(); const std::string msg = numberTo(timeMs) + " ms"; - std::clog << "Perf: duration: " << msg << '\n'; + std::clog << "Perf: duration: " << msg + '\n'; resultShown_ = true; + + watch_ = StopWatch(watch_.isPaused()); } private: -- cgit