From 556002bec1d76bc2c3ea0c688dd0d7aa4caa1c78 Mon Sep 17 00:00:00 2001 From: pleroy Date: Thu, 29 May 2014 17:32:04 +0200 Subject: [PATCH 1/2] Adding myself to the contributors --- CONTRIBUTORS | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index c20993af..c590ea92 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -30,6 +30,7 @@ Dominic Hamon Eugene Zhuk Felix Homann Oleksandr Sochka +Pascal Leroy Pierre Phaneuf Shuo Chen Yusuke Suzuki From 0d9a060f5b0d55d7fc37823c612883e465b00d46 Mon Sep 17 00:00:00 2001 From: pleroy Date: Wed, 4 Jun 2014 21:21:24 +0200 Subject: [PATCH 2/2] Two bug fixes in KeepRunning. --- src/benchmark.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/benchmark.cc b/src/benchmark.cc index 1ad2e32a..393890d5 100644 --- a/src/benchmark.cc +++ b/src/benchmark.cc @@ -955,7 +955,8 @@ State::State(FastClock* clock, SharedState* s, int t) bool State::KeepRunning() { // Fast path if ((FLAGS_benchmark_iterations == 0 && - !clock_->HasReached(stop_time_micros_ + pause_time_)) || + !clock_->HasReached(stop_time_micros_ + + kNumMicrosPerSecond * pause_time_)) || iterations_ < FLAGS_benchmark_iterations) { ++iterations_; return true; @@ -996,6 +997,9 @@ bool State::KeepRunning() { } } + if (ret) { + ++iterations_; + } return ret; }