13 typedef std::chrono::time_point<std::chrono::system_clock> time_stamp;
const time_stamp & GetStartTime()
Gets the start of execution time.
Definition: ProgressBar.hh:39
void FetchTerminalWidth()
Fetch the terminal width from the OS.
Definition: ProgressBar.cc:41
~ProgressBar()
Destructor.
Definition: ProgressBar.cc:28
size_t _twidth
Terminal width.
Definition: ProgressBar.hh:79
void SetTerminalWidth(size_t twidth)
Sets the width of the terminal.
Definition: ProgressBar.hh:48
time_stamp _start
Start time.
Definition: ProgressBar.hh:77
Pitch::errorLevel _level
Verbosity level.
Definition: ProgressBar.hh:80
time_stamp _current
Current time.
Definition: ProgressBar.hh:78
ProgressBar(Pitch::errorLevel level=Pitch::info)
Default constructor, sets the output to Pitch::info.
Definition: ProgressBar.cc:3
void SetCurrentTime(time_stamp current)
Sets the current time.
Definition: ProgressBar.hh:42
void SetVerbosityLevel(Pitch::errorLevel level)
Sets the verbosity level.
Definition: ProgressBar.hh:54
void PrintProgress(const size_t pc, const size_t n)
Prints the bar for a given percentage of progress.
Definition: ProgressBar.cc:47
ProgressBar & operator=(const ProgressBar &pbar)
Equality operator.
Definition: ProgressBar.cc:16
const size_t & GetTerminalWidth()
Gets the width of the terminal.
Definition: ProgressBar.hh:51
const Pitch::errorLevel & GetVerbosityLevel()
Gets the verbosity level.
Definition: ProgressBar.hh:57
void SetStartTime(time_stamp start)
Sets the start of execution time.
Definition: ProgressBar.hh:36
void GetProgress(const size_t n, const size_t N)
Prints the current progress in the terminal.
Definition: ProgressBar.cc:30
const time_stamp & GetCurrentTime()
Gets the current time.
Definition: ProgressBar.hh:45
errorLevel
Error level that determines where the output goes.
Definition: Pitch.hh:43
Provides a progess bar to be included in a for loop.
Definition: ProgressBar.hh:20