Cycle-driven timer.
More...
#include <health_monitor_timer.h>
Cycle-driven timer.
- Interval = time between ticks
- Timeout = total time before expiration
◆ Cycle_Timer() [1/2]
| hm::Cycle_Timer::Cycle_Timer |
( |
| ) |
|
|
default |
◆ Cycle_Timer() [2/2]
| hm::Cycle_Timer::Cycle_Timer |
( |
int |
interval, |
|
|
int |
timeout |
|
) |
| |
|
inline |
◆ adjust_timeout()
| void hm::Cycle_Timer::adjust_timeout |
( |
| ) |
|
Cycle Timer - Round up timeout to the next interval.
◆ expired()
| bool hm::Cycle_Timer::expired |
( |
| ) |
const |
|
inline |
◆ format_status()
| std::string hm::Cycle_Timer::format_status |
( |
| ) |
const |
Cycle Timer - Return formatted string with timer settings.
◆ interval()
| int hm::Cycle_Timer::interval |
( |
| ) |
const |
|
inline |
◆ remaining()
| int hm::Cycle_Timer::remaining |
( |
| ) |
const |
Cycle Timer - Return seconds remaining or 0.
◆ reset()
| void hm::Cycle_Timer::reset |
( |
| ) |
|
◆ set_interval()
| void hm::Cycle_Timer::set_interval |
( |
int |
interval | ) |
|
Cycle Timer - Set interval.
◆ set_name()
| void hm::Cycle_Timer::set_name |
( |
const std::string & |
name | ) |
|
|
inline |
◆ set_timeout()
| void hm::Cycle_Timer::set_timeout |
( |
int |
timeout | ) |
|
Cycle Timer - Set timeout.
◆ tick() [1/2]
| void hm::Cycle_Timer::tick |
( |
| ) |
|
Cycle Timer - Advance the timer using the default interval.
◆ tick() [2/2]
| void hm::Cycle_Timer::tick |
( |
int |
interval | ) |
|
Cycle Timer - Advance the timer using the given interval.
◆ timeout()
| int hm::Cycle_Timer::timeout |
( |
| ) |
const |
|
inline |
◆ m_expired
| bool hm::Cycle_Timer::m_expired {false} |
|
private |
◆ m_interval
◆ m_name
| std::string hm::Cycle_Timer::m_name {"Cycle_Timer"} |
|
private |
◆ m_timeout
◆ m_timer
| int hm::Cycle_Timer::m_timer {0} |
|
private |
The documentation for this class was generated from the following files: