Commit c10f3963 authored by Andreas Jung's avatar Andreas Jung

some optimization

parent 9d95a6d3
......@@ -76,9 +76,9 @@ class StdoutHandler:
def report(self, current, *args, **kw):
if current > 0:
seconds_so_far = time.time() - self._start
seconds_to_go = seconds_so_far / current * (self._max - current)
if current % self._steps == 0:
seconds_so_far = time.time() - self._start
seconds_to_go = seconds_so_far / current * (self._max - current)
self.output('%d/%d (%.2f%%) Estimated termination: %s' % \
(current, self._max, (100.0 * current / self._max),
DateTime(time.time() + seconds_to_go)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment