1
0
mirror of https://github.com/google/benchmark.git synced 2025-04-29 06:20:32 +08:00

prevent unneeded calculation of Slow()

This commit is contained in:
Eric Fiselier 2015-03-26 16:01:29 -04:00
parent 21207a4df5
commit 47442b9054

View File

@ -110,11 +110,11 @@ WallTime WallTimeImp::Now() {
return result + GetDrift();
}
now = Slow();
} while (cycleclock::Now() - ct > max_interval_cycles_);
// We are now sure that "now" and "result" were produced within
// kMaxErrorInterval of one another.
now = Slow();
SetDrift(now - result);
last_adjust_time_ = top_bits;
return now;