262
262
_BaseProgressBar.__init__(self, **kwargs)
264
264
self.width = terminal_width()
265
266
self.last_updates = deque()
270
271
"""Return True if the bar was updated too recently"""
271
272
# time.time consistently takes 40/4000 ms = 0.01 ms.
272
273
# but every single update to the pb invokes it.
273
274
# so we use time.clock which takes 20/4000 ms = 0.005ms
274
275
# on the downside, time.clock() appears to have approximately
275
276
# 10ms granularity, so we treat a zero-time change as 'throttled.'
281
279
interval = now - self.last_update
283
281
if interval < self.MIN_PAUSE: