mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-20 19:11:08 +03:00
Time comparisons are difficult. Or not.
This commit is contained in:
parent
f7d0fe1840
commit
e9c50ccb56
1 changed files with 1 additions and 1 deletions
|
@ -39,7 +39,7 @@ impl RateCounter {
|
|||
let now_millis = millis_since_epoch();
|
||||
self.last_min_times.push(now_millis);
|
||||
self.last_min_bytes.push(bytes);
|
||||
while self.last_min_times.len() > 0 && self.last_min_times[0] > now_millis + 60000 {
|
||||
while self.last_min_times.len() > 0 && self.last_min_times[0] + 60000 < now_millis {
|
||||
self.last_min_times.remove(0);
|
||||
self.last_min_bytes.remove(0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue