Defines a timeout.
More...
#include <Imt.Base.OS.WinEC7/Timeout.h>
Defines a timeout.
A timeout can be configured by a period. When the timeout gets started it enter state 'not timeout' until the configured period expires. Then the timeout is in state 'timed out'.
◆ Timeout()
imt::base::os::winec7::Timeout::Timeout |
( |
const TimePeriod & |
timePeriod | ) |
|
|
explicit |
Constructor.
Timer is initialy not started. Call method start().
- Parameters
-
timePeriod | Period when the timeout expires. |
◆ ~Timeout()
virtual imt::base::os::winec7::Timeout::~Timeout |
( |
void |
| ) |
|
|
virtual |
◆ getRemainingTime()
TimePeriod imt::base::os::winec7::Timeout::getRemainingTime |
( |
void |
| ) |
const |
Returns remaining time until timeout will be reached.
- Returns
- Remaining time until timeout will be reached. If timeout has timed out or is not started a zero TimePeriod gets returned.
◆ isStarted()
bool imt::base::os::winec7::Timeout::isStarted |
( |
void |
| ) |
const |
Is timer active (started).
- Returns
- True if timer is started. Else false.
◆ isTimeout()
bool imt::base::os::winec7::Timeout::isTimeout |
( |
void |
| ) |
const |
Returns true if specified timeout is reached.
- Returns
- True if timeout is started and timeout reached.
◆ setTimeout()
void imt::base::os::winec7::Timeout::setTimeout |
( |
const TimePeriod & |
timePeriod | ) |
|
Sets a timeout.
- Parameters
-
timePeriod | Period when the timeout expires. |
◆ start()
void imt::base::os::winec7::Timeout::start |
( |
void |
| ) |
|
Starts the timer with configured time period.
◆ stopAndReset()
void imt::base::os::winec7::Timeout::stopAndReset |
( |
void |
| ) |
|
Stops and resets the timer.
The documentation for this class was generated from the following file:
- D:/_Work/10/s/Imt.Base/Imt.Base.OS.WinEC7/Timeout.h