From 3e338d74139fa09b23f4850079c5bcb1b191d2c1 Mon Sep 17 00:00:00 2001 From: Matthew Von-Maszewski Date: Thu, 28 Jan 2021 09:02:10 -0500 Subject: [PATCH] revert my hack that disabled StopWatchNano ... and caused build warnings (#23) --- util/stop_watch.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/stop_watch.h b/util/stop_watch.h index 68ab8905e..b018eb1d6 100644 --- a/util/stop_watch.h +++ b/util/stop_watch.h @@ -91,10 +91,10 @@ class StopWatchNano { } } - void Start() { start_ = 0; /*env_->NowNanos();*/ } + void Start() { start_ = env_->NowNanos(); } uint64_t ElapsedNanos(bool reset = false) { - auto now = 0; // env_->NowNanos(); + auto now = env_->NowNanos(); auto elapsed = now - start_; if (reset) { start_ = now; @@ -103,7 +103,7 @@ class StopWatchNano { } uint64_t ElapsedNanosSafe(bool reset = false) { - return 0; //(env_ != nullptr) ? ElapsedNanos(reset) : 0U; + return (env_ != nullptr) ? ElapsedNanos(reset) : 0U; } private: