summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/progress.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:50:56 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:50:56 +0000
commit1a7c9eba99a9521a7722be37d6bafe5fa4936630 (patch)
treef999c88f8cb2979fe442e6e1cd0778d01e4c535e /apt-pkg/contrib/progress.cc
parent3164dff98e933252249afc0de9e8469b9696fd42 (diff)
Big changes
Author: jgg Date: 1998-08-23 03:52:22 GMT Big changes
Diffstat (limited to 'apt-pkg/contrib/progress.cc')
-rw-r--r--apt-pkg/contrib/progress.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/apt-pkg/contrib/progress.cc b/apt-pkg/contrib/progress.cc
index aae0ea1e3..4be7b87b9 100644
--- a/apt-pkg/contrib/progress.cc
+++ b/apt-pkg/contrib/progress.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: progress.cc,v 1.4 1998/07/26 04:51:45 jgg Exp $
+// $Id: progress.cc,v 1.5 1998/08/23 03:52:22 jgg Exp $
/* ######################################################################
OpProgress - Operation Progress
@@ -76,9 +76,14 @@ bool OpProgress::CheckChange(float Interval)
}
MajorChange = false;
+ if (SubOp != LastSubOp)
+ {
+ LastSubOp = SubOp;
+ return true;
+ }
+
if ((int)LastPercent == (int)Percent)
return false;
- LastPercent = Percent;
// Check time delta
struct timeval Now;
@@ -87,6 +92,7 @@ bool OpProgress::CheckChange(float Interval)
if (Diff < Interval)
return false;
LastTime = Now;
+ LastPercent = Percent;
return true;
}
/*}}}*/