LoRa_APRS_iGate/lib/System/Timer.h

26 wiersze
323 B
C
Czysty Zwykły widok Historia

2021-03-12 19:01:47 +00:00
#ifndef TIMER_H_
#define TIMER_H_
#include <TimeLib.h>
class Timer {
2021-03-12 19:01:47 +00:00
public:
Timer();
2021-03-12 19:01:47 +00:00
void setTimeout(const uint32_t timeout_ms);
time_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