Skip to content

Commit

Permalink
revert my hack that disabled StopWatchNano ... and caused build warni…
Browse files Browse the repository at this point in the history
…ngs (#23)
  • Loading branch information
matthewvon authored Jan 28, 2021
1 parent f8ddb4e commit 3e338d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions util/stop_watch.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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:
Expand Down

0 comments on commit 3e338d7

Please sign in to comment.