mirror of
https://github.com/google/benchmark.git
synced 2025-03-26 20:10:32 +08:00
Merge branch 'TwoBugs' into StatsPure
This commit is contained in:
commit
db4248e21e
@ -974,7 +974,8 @@ State::State(FastClock* clock, SharedState* s, int t)
|
|||||||
bool State::KeepRunning() {
|
bool State::KeepRunning() {
|
||||||
// Fast path
|
// Fast path
|
||||||
if ((FLAGS_benchmark_iterations == 0 &&
|
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_ < FLAGS_benchmark_iterations) {
|
||||||
++iterations_;
|
++iterations_;
|
||||||
return true;
|
return true;
|
||||||
@ -1015,6 +1016,9 @@ bool State::KeepRunning() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ret) {
|
||||||
|
++iterations_;
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user