From 70e31e4a6024e051914fefdb50112e03d8c982e2 Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Fri, 8 Nov 2013 15:54:04 -0500 Subject: [PATCH] Make progress counter give one last output in its finalize method --- openbr/plugins/misc.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openbr/plugins/misc.cpp b/openbr/plugins/misc.cpp index a47baa4..3961085 100644 --- a/openbr/plugins/misc.cpp +++ b/openbr/plugins/misc.cpp @@ -596,11 +596,13 @@ class ProgressCounterTransform : public TimeVaryingTransform void finalize(TemplateList & data) { (void) data; + float p = 100 * float(calls) / totalTemplates; + qDebug("%05.2f%% ELAPSED=%s REMAINING=%s COUNT=%g \r", p, QtUtils::toTime(Globals->startTime.elapsed()/1000.0f).toStdString().c_str(), QtUtils::toTime(0).toStdString().c_str(), float(calls)); } void init() { - calls = 0; + calls = -1; set_calls = 0; timer.start(); Globals->startTime.start(); -- libgit2 0.21.4