Better double comparison.
GitOrigin-RevId: 5a7092ce72e7531835d57455a8027819a6f03ab5
This commit is contained in:
parent
b676810b50
commit
4304fcfd89
|
@ -46,8 +46,11 @@ class TimedStat {
|
||||||
StatT next_;
|
StatT next_;
|
||||||
double next_timestamp_;
|
double next_timestamp_;
|
||||||
|
|
||||||
void update(double now) {
|
void update(double &now) {
|
||||||
CHECK(now >= next_timestamp_);
|
if (now < next_timestamp_) {
|
||||||
|
CHECK(now >= next_timestamp_ * (1 - 1e-14)) << now << " " << next_timestamp_;
|
||||||
|
now = next_timestamp_;
|
||||||
|
}
|
||||||
if (duration_ == 0) {
|
if (duration_ == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user