LoRa_APRS_iGate/lib/System/Timer.h

24 wiersze
305 B
C
Czysty Zwykły widok Historia

2021-03-12 19:01:47 +00:00
#ifndef TIMER_H_
#define TIMER_H_
class Timer {
2021-03-12 19:01:47 +00:00
public:
Timer();
2021-03-12 19:01:47 +00:00
2021-05-18 23:17:23 +00:00
void setTimeout(const uint32_t timeout_ms);
uint32_t getTriggerTimeInSec() const;
2021-03-12 19:01:47 +00:00
bool isActive() const;
2021-03-12 19:01:47 +00:00
void reset();
2021-03-12 19:01:47 +00:00
bool check();
void start();
2021-03-12 19:01:47 +00:00
private:
uint32_t _timeout_ms;
uint32_t _nextTimeout;
2021-03-12 19:01:47 +00:00
};
#endif