Commit 52a04c2bbf16368a2afa1814eb35ce0862626ab0

Authored by Charles Otto
1 parent b44ba452

Flush stderr after printing progress

It occurs to me that the reason the progress display updates so
infrequently is because stderr was never getting flushed.
Showing 1 changed file with 1 additions and 0 deletions
openbr/openbr_plugin.cpp
@@ -866,6 +866,7 @@ void br::Context::printStatus() @@ -866,6 +866,7 @@ void br::Context::printStatus()
866 if (p < 1) { 866 if (p < 1) {
867 int s = timeRemaining(); 867 int s = timeRemaining();
868 fprintf(stderr,"%05.2f%% ELAPSED=%s REMAINING=%s COUNT=%g \r", p*100, QtUtils::toTime(Globals->startTime.elapsed()/1000.0f).toStdString().c_str(), QtUtils::toTime(s).toStdString().c_str(), Globals->currentStep); 868 fprintf(stderr,"%05.2f%% ELAPSED=%s REMAINING=%s COUNT=%g \r", p*100, QtUtils::toTime(Globals->startTime.elapsed()/1000.0f).toStdString().c_str(), QtUtils::toTime(s).toStdString().c_str(), Globals->currentStep);
  869 + fflush(stderr);
869 } 870 }
870 } 871 }
871 872