summaryrefslogtreecommitdiffstats
path: root/perl-install/install/steps_gtk.pm
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.org>2010-01-20 13:37:01 +0000
committerPascal Terjan <pterjan@mandriva.org>2010-01-20 13:37:01 +0000
commitc29c8b0fe1405abfe4c4a9e74a94b5f4e3f312ce (patch)
tree93329c344555707159abae1d8bf522e51b02814f /perl-install/install/steps_gtk.pm
parent6171ca6837a7cd44c4b1f07c4b6f335219c77cd2 (diff)
downloaddrakx-backup-do-not-use-c29c8b0fe1405abfe4c4a9e74a94b5f4e3f312ce.tar
drakx-backup-do-not-use-c29c8b0fe1405abfe4c4a9e74a94b5f4e3f312ce.tar.gz
drakx-backup-do-not-use-c29c8b0fe1405abfe4c4a9e74a94b5f4e3f312ce.tar.bz2
drakx-backup-do-not-use-c29c8b0fe1405abfe4c4a9e74a94b5f4e3f312ce.tar.xz
drakx-backup-do-not-use-c29c8b0fe1405abfe4c4a9e74a94b5f4e3f312ce.zip
Try to get better initial estimation of install time
Diffstat (limited to 'perl-install/install/steps_gtk.pm')
-rw-r--r--perl-install/install/steps_gtk.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/install/steps_gtk.pm b/perl-install/install/steps_gtk.pm
index 99bc9dc23..05cf2f9cc 100644
--- a/perl-install/install/steps_gtk.pm
+++ b/perl-install/install/steps_gtk.pm
@@ -611,7 +611,7 @@ sub installPackages {
#- $amount and $total are used to return number of package and total size.
$nb = $amount;
$total_size = $total; $current_total_size = 0;
- $o->{install_start_time} = time();
+ $o->{install_start_time} = 0;
mygtk2::gtkadd($pkg_log_widget, text => P("%d package", "%d packages", $nb, $nb));
$w->flush;
} elsif ($type eq 'open') {
@@ -631,6 +631,7 @@ sub installPackages {
$w->flush;
} elsif ($type eq 'inst' && $subtype eq 'progress') {
+ $o->{install_start_time} = time() unless $o->{install_start_time};
gtkval_modify(\$pkg_progress, $total ? $amount / $total : 0);
my $dtime = time() - $o->{install_start_time};