|
|
using | Clock = std::chrono::steady_clock |
| |
|
using | TimePoint = std::chrono::steady_clock::time_point |
| |
|
using | Duration = cloe::Duration |
| |
|
|
void | to_json (cloe::Json &j, const Progress &e) |
| |
◆ begin()
| void engine::Progress::begin |
( |
| ) |
|
|
inline |
Reset the clock to now.
This does not alter the current progress bar, because that is anyways overwritten with each update.
◆ elapsed()
| Duration engine::Progress::elapsed |
( |
| ) |
const |
|
inline |
Return the elapsed time since the beginning or the final elapsed time.
◆ end()
| void engine::Progress::end |
( |
| ) |
|
|
inline |
Set the clock to terminate now.
This is better than calling update(1.0) because there are no rounding errors that can occur here. Also, this also stores the termination time which effectively saves the elapsed time.
◆ eta()
| Duration engine::Progress::eta |
( |
| ) |
const |
|
inline |
Return the expected remaining duration.
◆ is_ended()
| bool engine::Progress::is_ended |
( |
| ) |
const |
|
inline |
Return true if end() was called for this progress.
◆ percent()
| double engine::Progress::percent |
( |
| ) |
const |
|
inline |
Return the current progress as a percentage between 0.0 and 1.0.
◆ update()
| void engine::Progress::update |
( |
double |
p | ) |
|
|
inline |
Update the progress with a value between 0.0 and 1.0.
◆ update_safe()
| void engine::Progress::update_safe |
( |
double |
p | ) |
|
|
inline |
Update the progress with a value that is corrected to between 0.0 and 1.0.
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/cloe/checkouts/v0.24.0/engine/src/utility/progress.hpp