summaryrefslogtreecommitdiffstats
path: root/text.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2000-08-03 21:34:46 +0000
committerMatt Wilson <msw@redhat.com>2000-08-03 21:34:46 +0000
commite4a5335ebdd7e5d7836ce693922cffdec02a93ab (patch)
tree4525115e0aedba956e45095e8e0e1a1eedf9e7b5 /text.py
parente1722e2557b387f8b809cc6159c76b11d406d24c (diff)
downloadanaconda-e4a5335ebdd7e5d7836ce693922cffdec02a93ab.tar.gz
anaconda-e4a5335ebdd7e5d7836ce693922cffdec02a93ab.tar.xz
anaconda-e4a5335ebdd7e5d7836ce693922cffdec02a93ab.zip
fix time
Diffstat (limited to 'text.py')
-rw-r--r--text.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/text.py b/text.py
index de20ea9c6..2a08d9f0d 100644
--- a/text.py
+++ b/text.py
@@ -561,7 +561,11 @@ class InstallProgressWindow:
self.sizeRemainingW.setText("%10dM" % (self.sizeTotal/1024 - self.sizeComplete/1024))
self.total.set(self.sizeComplete)
- elapsedTime = time.time() - self.timeStarted
+ if self.timeStarted == -1:
+ self.timeStarted = time.time()
+ elapsedTime = time.time() - self.timeStarted
+ if not elapsedTime:
+ elapsedTime = 1
self.timeCompleteW.setText("%12s" % formatTime(elapsedTime))
if self.sizeComplete != 0:
finishTime = (float (self.sizeTotal) / (self.sizeComplete)) * elapsedTime;
@@ -661,7 +665,7 @@ class InstallProgressWindow:
self.total = Scale (width, totalSize)
toplevel.add(self.total, 0, 4, (0, 1, 0, 0))
- self.timeStarted = time.time()
+ self.timeStarted = -1
toplevel.draw()
self.g = toplevel