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