#include "QProgress.h"
ClassImp(QProgress)
void QProgress::operator()(Int_t curval,Bool_t force)
{
Long_t time=GetTime();
if((time-fLastTime)>=fInterval || force){
fLastTime=time;
Int_t runtime=(Int_t)((time-fInitTime)/1000.);
Float_t frac=(Float_t)curval/fMaxVal;
Int_t tottime=(Int_t)(runtime/frac);
Int_t remtime=tottime-runtime;
if(runtime>=1){
fprintf(stderr,"\r[%2i:%02i] %7i/%7i (%3i%%) [rem: %2i:%02i, total: %2i:%02i]",runtime/60,runtime%60,curval,fMaxVal,(Int_t)(100*frac),remtime/60,remtime%60,tottime/60,tottime%60);
}else{
fprintf(stderr,"\r[%2i:%02i] %7i/%7i (%3i%%)",runtime/60,runtime%60,curval,fMaxVal,(Int_t)(100*frac));
}
}
}
Long_t QProgress::GetTime(){
return gSystem->Now();
}
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.