LoRa_APRS_iGate/lib/TaskManager/Timer.h

26 lines
310 B
C
Raw Normal View History

2021-03-12 20:01:47 +01:00
#ifndef TIMER_H_
#define TIMER_H_
#include <TimeLib.h>
class Timer {
2021-03-12 20:01:47 +01:00
public:
Timer();
2021-03-12 20:01:47 +01:00
void setTimeout(const time_t timeout_sec);
time_t getTriggerTime() const;
2021-03-12 20:01:47 +01:00
bool isActive() const;
2021-03-12 20:01:47 +01:00
void reset();
2021-03-12 20:01:47 +01:00
bool check();
void start();
2021-03-12 20:01:47 +01:00
private:
time_t _timeout_sec;
time_t _timeout;
2021-03-12 20:01:47 +01:00
};
#endif