From c29c8b0fe1405abfe4c4a9e74a94b5f4e3f312ce Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Wed, 20 Jan 2010 13:37:01 +0000 Subject: Try to get better initial estimation of install time --- perl-install/install/steps_gtk.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'perl-install/install/steps_gtk.pm') 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}; -- cgit v1.2.1