From d568ed2d3ba5d7d05e4381ee59468a124309f152 Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:51:37 +0000 Subject: Item done counters Author: jgg Date: 1998-11-23 07:32:19 GMT Item done counters --- apt-pkg/acquire.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'apt-pkg/acquire.cc') diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 3bd7662fd..f9691df9c 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: acquire.cc,v 1.17 1998/11/22 23:37:03 jgg Exp $ +// $Id: acquire.cc,v 1.18 1998/11/23 07:32:19 jgg Exp $ /* ###################################################################### Acquire - File Acquiration @@ -612,6 +612,8 @@ void pkgAcquireStatus::Pulse(pkgAcquire *Owner) { TotalBytes = 0; CurrentBytes = 0; + TotalItems = 0; + CurrentItems = 0; // Compute the total number of bytes to fetch unsigned int Unknown = 0; @@ -619,6 +621,10 @@ void pkgAcquireStatus::Pulse(pkgAcquire *Owner) for (pkgAcquire::Item **I = Owner->ItemsBegin(); I != Owner->ItemsEnd(); I++, Count++) { + TotalItems++; + if ((*I)->Status == pkgAcquire::Item::StatDone) + CurrentItems++; + // Totally ignore local items if ((*I)->Local == true) continue; @@ -685,6 +691,8 @@ void pkgAcquireStatus::Start() TotalBytes = 0; FetchedBytes = 0; ElapsedTime = 0; + TotalItems = 0; + CurrentItems = 0; } /*}}}*/ // AcquireStatus::Stop - Finished downloading /*{{{*/ -- cgit v1.2.3-70-g09d2