diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-03-29 12:56:12 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-03-29 12:56:12 +0200 |
| commit | f87c00b4aa0cbeba35c3b3bb9f8274b58def1a50 (patch) | |
| tree | 72650c31fda2f7e8e39b5c4c4840ba1a0d02d9d2 | |
| parent | 82f0ab9f1c70ed64dfe5c3512c10e8cb42103c5f (diff) | |
| download | python-apt-f87c00b4aa0cbeba35c3b3bb9f8274b58def1a50.tar.gz | |
* added inital startup time data gathering phase
| -rw-r--r-- | DistUpgrade/DistUpgradeViewGtk.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/DistUpgrade/DistUpgradeViewGtk.py b/DistUpgrade/DistUpgradeViewGtk.py index 80eb8815..2fc0c50b 100644 --- a/DistUpgrade/DistUpgradeViewGtk.py +++ b/DistUpgrade/DistUpgradeViewGtk.py @@ -115,7 +115,8 @@ class GtkFetchProgressAdapter(apt.progress.FetchProgress): return True class GtkInstallProgressAdapter(InstallProgress): - UPDATE_HZ = 1 + UPDATE_HZ = 2 + INITIAL_DATA_GATHERING = 15 def __init__(self,parent): InstallProgress.__init__(self) @@ -222,10 +223,11 @@ class GtkInstallProgressAdapter(InstallProgress): # check if we haven't started yet with packages, pulse then if self.start_time == 0.0: self.progress.pulse() - time.sleep(0.15) + time.sleep(0.2) else: # it started! - if (time.time() - self.last_time) > self.UPDATE_HZ: + if (self.start_time + self.INITIAL_DATA_GATHERING) < time.time() and\ + (time.time() - self.last_time) > self.UPDATE_HZ: self.last_time = time.time() delta = self.last_time - self.start_time eta = (100.0 - self.percent) * (float(delta)/self.percent) |
