The ProgressTimer is a utility class that can be used to calculate the estimated time to finish a task. More...
#include <ProgressTimer.h>
Public Member Functions | |
| std::string | getMessage () |
| Get the information about the evolution of the process. | |
| double | getRemainingTimeInMin () const |
| Function used to get the remaining time to end the process. | |
| double | getSpeedTimeInSec () const |
| Function used to get the speed time. | |
| ProgressTimer (int totalSteps, std::string message) | |
| It initializes a ProgressTimer. | |
| void | setMessage (std::string message) |
| Set the message used by task progress. | |
| void | setTotalSteps (int totalSteps) |
| Set the total steps. | |
| void | start () |
| Start the internal timer. | |
| void | tick () |
| Define a new step process evolution. | |
| ~ProgressTimer () | |
| Destructor. | |
Private Attributes | |
| int | m_count |
| Internal counter. | |
| std::string | m_message |
| Original task message. | |
| double | m_remainingTime |
| Remaining time in minutes. | |
| double | m_speedTime |
| Speed time in seconds. | |
| time_t | m_startTime |
| Initial time. | |
| int | m_totalSteps |
| Total steps. | |
The ProgressTimer is a utility class that can be used to calculate the estimated time to finish a task.
Definition at line 47 of file ProgressTimer.h.
| te::common::ProgressTimer::ProgressTimer | ( | int | totalSteps, |
| std::string | message | ||
| ) |
It initializes a ProgressTimer.
| te::common::ProgressTimer::~ProgressTimer | ( | ) |
Destructor.
| std::string te::common::ProgressTimer::getMessage | ( | ) |
Get the information about the evolution of the process.
| double te::common::ProgressTimer::getRemainingTimeInMin | ( | ) | const |
Function used to get the remaining time to end the process.
| double te::common::ProgressTimer::getSpeedTimeInSec | ( | ) | const |
Function used to get the speed time.
| void te::common::ProgressTimer::setMessage | ( | std::string | message | ) |
Set the message used by task progress.
| void te::common::ProgressTimer::setTotalSteps | ( | int | totalSteps | ) |
Set the total steps.
| void te::common::ProgressTimer::start | ( | ) |
Start the internal timer.
| void te::common::ProgressTimer::tick | ( | ) |
Define a new step process evolution.
|
private |
Internal counter.
Definition at line 98 of file ProgressTimer.h.
|
private |
Original task message.
Definition at line 102 of file ProgressTimer.h.
|
private |
Remaining time in minutes.
Definition at line 100 of file ProgressTimer.h.
|
private |
Speed time in seconds.
Definition at line 101 of file ProgressTimer.h.
|
private |
Initial time.
Definition at line 99 of file ProgressTimer.h.
|
private |
Total steps.
Definition at line 97 of file ProgressTimer.h.