Commit 70e31e4a6024e051914fefdb50112e03d8c982e2
1 parent
b2eb42a0
Make progress counter give one last output in its finalize method
Showing
1 changed file
with
3 additions
and
1 deletions
openbr/plugins/misc.cpp
| @@ -596,11 +596,13 @@ class ProgressCounterTransform : public TimeVaryingTransform | @@ -596,11 +596,13 @@ class ProgressCounterTransform : public TimeVaryingTransform | ||
| 596 | void finalize(TemplateList & data) | 596 | void finalize(TemplateList & data) |
| 597 | { | 597 | { |
| 598 | (void) data; | 598 | (void) data; |
| 599 | + float p = 100 * float(calls) / totalTemplates; | ||
| 600 | + 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)); | ||
| 599 | } | 601 | } |
| 600 | 602 | ||
| 601 | void init() | 603 | void init() |
| 602 | { | 604 | { |
| 603 | - calls = 0; | 605 | + calls = -1; |
| 604 | set_calls = 0; | 606 | set_calls = 0; |
| 605 | timer.start(); | 607 | timer.start(); |
| 606 | Globals->startTime.start(); | 608 | Globals->startTime.start(); |