progress_thread.h
337 Bytes
#ifndef PROGRESS_THREAD
#define PROGRESS_THREAD
//function to display a progress bar
void progressbar_thread(double* e){
unsigned int p = 0;
while(p != 100){
std::cout.flush();
if(*e > p){
p = (unsigned int)(*e);
rtsProgressBar(p);
}
}
std::cout<<std::endl; //put a newline after the completed progress bar
}
#endif