Skip to content

Commit

Permalink
Merge pull request ninja-build#2101 from ken-matsui/patch-1
Browse files Browse the repository at this point in the history
Avoid shadowing `time_millis_`, the field of `StatusPrinter`
  • Loading branch information
jhasse authored Aug 30, 2022
2 parents 4efaf1b + ea04cf3 commit a7ddbe7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/status.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ struct StatusPrinter : Status {

double rate() { return rate_; }

void UpdateRate(int update_hint, int64_t time_millis_) {
void UpdateRate(int update_hint, int64_t time_millis) {
if (update_hint == last_update_)
return;
last_update_ = update_hint;

if (times_.size() == N)
times_.pop();
times_.push(time_millis_);
times_.push(time_millis);
if (times_.back() != times_.front())
rate_ = times_.size() / ((times_.back() - times_.front()) / 1e3);
}
Expand Down

0 comments on commit a7ddbe7

Please sign in to comment.