ProgressReport¶
-
class
ProgressReport
¶ Periodically report on the progress of long tasks and estimate remaining time to completion.
Public Functions
-
ProgressReport
(const argtype &args = argtype())¶ args:
num: number of iterations (default: 1).
percent_per_write: report every this many percent progress made. (default: 0.1 e.g., 10%)
file_name: append report to this file. If empty, cout (default: empty).
-
void
set_num
(const int num)¶ Set the number of iterations to completion.
-
void
reset
()¶ Reset the progress report.
-
double
percent
() const¶ Return the current progress percentage.
-
void
write
()¶ Write the report.
-
void
serialize
(std::ostream &ostr) const¶ Serialize object.
-
ProgressReport
(std::istream &istr)¶ Deserialize object.
-