Time calculation fix.

This commit is contained in:
Andrzej Kapolka 2014-10-21 17:41:41 -07:00
parent 311d1332f1
commit 4840c44d7c

View file

@ -705,7 +705,7 @@ Throttle::Throttle() :
bool Throttle::shouldThrottle(int bytes) {
// clear expired buckets
qint64 now = QDateTime::currentMSecsSinceEpoch();
while (!_buckets.isEmpty() && _buckets.first().first >= now) {
while (!_buckets.isEmpty() && now >= _buckets.first().first) {
_total -= _buckets.takeFirst().second;
}