Commit 8813ca47a71388b6f6723424e5521db56bf85025

Authored by Scott Klum
1 parent fdfdd566

Attempting to get consistent progress messages across br

openbr/openbr_plugin.cpp
@@ -863,7 +863,7 @@ void br::Context::printStatus() @@ -863,7 +863,7 @@ void br::Context::printStatus()
863 const float p = progress(); 863 const float p = progress();
864 if (p < 1) { 864 if (p < 1) {
865 int s = timeRemaining(); 865 int s = timeRemaining();
866 - fprintf(stderr, "%05.2f%% REMAINING=%s COUNT=%g \r", 100 * p, QtUtils::toTime(s/1000.0f).toStdString().c_str(), totalSteps); 866 + fprintf(stderr, "%05.2f%% ELAPSED=%s REMAINING=%s COUNT=%g/%g \r", p*100., QtUtils::toTime(Globals->startTime.elapsed()/1000.0f).toStdString().c_str(), QtUtils::toTime(s).toStdString().c_str(), Globals->currentStep, Globals->totalSteps);
867 } 867 }
868 } 868 }
869 869
openbr/plugins/misc.cpp
@@ -519,11 +519,7 @@ class ProgressCounterTransform : public TimeVaryingTransform @@ -519,11 +519,7 @@ class ProgressCounterTransform : public TimeVaryingTransform
519 519
520 // updated every second 520 // updated every second
521 if (elapsed > 1000) { 521 if (elapsed > 1000) {
522 - float p = br_progress();  
523 - int s = br_time_remaining();  
524 -  
525 - fprintf(stderr, "%05.2f%% ELAPSED=%s REMAINING=%s COUNT=%g/%g \r", p*100., QtUtils::toTime(Globals->startTime.elapsed()/1000.0f).toStdString().c_str(), QtUtils::toTime(s).toStdString().c_str(), Globals->currentStep, Globals->totalSteps);  
526 - 522 + Globals->printStatus();
527 timer.start(); 523 timer.start();
528 } 524 }
529 525