small bug

This commit is contained in:
Jimmy Cao 2011-07-10 15:25:22 -05:00
parent c76f9215c4
commit af938fcf56

View File

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