diff options
author | Matt Wilson <msw@redhat.com> | 2000-08-03 21:34:46 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2000-08-03 21:34:46 +0000 |
commit | e4a5335ebdd7e5d7836ce693922cffdec02a93ab (patch) | |
tree | 4525115e0aedba956e45095e8e0e1a1eedf9e7b5 /text.py | |
parent | e1722e2557b387f8b809cc6159c76b11d406d24c (diff) | |
download | anaconda-e4a5335ebdd7e5d7836ce693922cffdec02a93ab.tar.gz anaconda-e4a5335ebdd7e5d7836ce693922cffdec02a93ab.tar.xz anaconda-e4a5335ebdd7e5d7836ce693922cffdec02a93ab.zip |
fix time
Diffstat (limited to 'text.py')
-rw-r--r-- | text.py | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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 |