@ -51,8 +51,8 @@ class TokenBucket(object):
@property
def tokens(self):
now = time()
if self._tokens < self.capacity:
now = time.time()
delta = self.fill_rate * (now - self.timestamp)
self._tokens = min(self.capacity, self._tokens + delta)
self.timestamp = now