summaryrefslogtreecommitdiffstats
path: root/perl-install/install
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
parent6171ca6837a7cd44c4b1f07c4b6f335219c77cd2 (diff)
downloaddrakx-c29c8b0fe1405abfe4c4a9e74a94b5f4e3f312ce.tar
drakx-c29c8b0fe1405abfe4c4a9e74a94b5f4e3f312ce.tar.gz
drakx-c29c8b0fe1405abfe4c4a9e74a94b5f4e3f312ce.tar.bz2
drakx-c29c8b0fe1405abfe4c4a9e74a94b5f4e3f312ce.tar.xz
drakx-c29c8b0fe1405abfe4c4a9e74a94b5f4e3f312ce.zip
Try to get better initial estimation of install time
Diffstat (limited to 'perl-install/install')
-rw-r--r--perl-install/install/NEWS2
-rw-r--r--perl-install/install/steps_gtk.pm3
2 files changed, 4 insertions, 1 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index e2a197569..d50ace47c 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,5 @@
+- try to get better initial estimation of install time
+
Version 13.4 - 7 January 2009
- alpha1 logo
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};