Improve TimedStat value after long pause.

This commit is contained in:
levlam 2022-11-01 14:03:20 +03:00
parent b4432a27ba
commit 8c694cd3d3

View File

@ -58,7 +58,7 @@ class TimedStat {
} }
if (next_timestamp_ + 2 * duration_ < now) { if (next_timestamp_ + 2 * duration_ < now) {
current_ = StatT(); current_ = StatT();
current_timestamp_ = now; current_timestamp_ = now - duration_;
next_ = StatT(); next_ = StatT();
next_timestamp_ = now; next_timestamp_ = now;
} else if (next_timestamp_ + duration_ < now) { } else if (next_timestamp_ + duration_ < now) {