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:
parent
21207a4df5
commit
47442b9054
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user