[Zope-Checkins]
SVN: Zope/trunk/lib/python/Products/ZCatalog/ProgressHandler.py
some optimization
Andreas Jung
andreas at andreas-jung.com
Sun Mar 27 06:05:57 EST 2005
Log message for revision 29688:
some optimization
Changed:
U Zope/trunk/lib/python/Products/ZCatalog/ProgressHandler.py
-=-
Modified: Zope/trunk/lib/python/Products/ZCatalog/ProgressHandler.py
===================================================================
--- Zope/trunk/lib/python/Products/ZCatalog/ProgressHandler.py 2005-03-26 17:19:57 UTC (rev 29687)
+++ Zope/trunk/lib/python/Products/ZCatalog/ProgressHandler.py 2005-03-27 11:05:57 UTC (rev 29688)
@@ -76,9 +76,9 @@
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)))
More information about the Zope-Checkins
mailing list