def _formatter_remaining(self): if not self._max: raise RuntimeError("Unable to display the remaining time " "if the maximum number of steps is not set.") if not self._step: remaining = 0 else: remaining = round((time.time() - self._start_time) / self._step * (self._max - self._max)) return format_time(remaining)
def _formatter_elapsed(self): return format_time(time.time() - self._start_time)