diff --git a/tdutils/td/utils/TimedStat.h b/tdutils/td/utils/TimedStat.h index 3ab7e0c4..fc419747 100644 --- a/tdutils/td/utils/TimedStat.h +++ b/tdutils/td/utils/TimedStat.h @@ -46,8 +46,11 @@ class TimedStat { StatT next_; double next_timestamp_; - void update(double now) { - CHECK(now >= next_timestamp_); + void update(double &now) { + if (now < next_timestamp_) { + CHECK(now >= next_timestamp_ * (1 - 1e-14)) << now << " " << next_timestamp_; + now = next_timestamp_; + } if (duration_ == 0) { return; }