47 #ifndef _MIRA_PRINTPROGRESSBAR_H_ 48 #define _MIRA_PRINTPROGRESSBAR_H_ 64 std::cout <<
"0% 10 20 30 40 50 60 70 80 90 100%" << std::endl;
65 std::cout <<
"|----|----|----|----|----|----|----|----|----|----|" << std::endl;
91 if ((value%updateInterval) != 0)
95 int ticks = (int64)value * 50 /
maximum;
96 for(
int i=0; i<ticks; ++i)
99 for(
int i=ticks; i<50; ++i)
103 std::cout <<
" finished in approx. " 105 std::flush(std::cout);
112 for(
int i=0; i<=50; ++i)
114 std::cout <<
" finished " << std::endl;
115 std::flush(std::cout);
tick_type milliseconds() const
Returns normalized number of milliseconds (0..999)
Definition: Time.h:285
void printFinishedProgressBar()
Definition: PrintProgressBar.h:109
PropertyHint maximum(const T &max)
Sets the attribute "maximum" to the specified value.
Definition: PropertyHint.h:253
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
Time and Duration wrapper class.
Wrapper class for boost::posix_time::ptime for adding more functionality to it.
Definition: Time.h:418
static Time now() static Time eternity()
Returns the current utc based time.
Definition: Time.h:481
void printProgressBar(int value, int maximum, const Time &startTime, int updateInterval=1)
Prints a progress bar in the console and shows the approximated time until the progress is finished...
Definition: PrintProgressBar.h:89
void printProgressBarHeader()
Prints the header part of a progress bar.
Definition: PrintProgressBar.h:62