LoRa_APRS_iGate/lib/System/Timer.h

26 wiersze
310 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 time_t timeout_sec);
time_t getTriggerTime() 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:
time_t _timeout_sec;
time_t _timeout;
2021-03-12 19:01:47 +00:00
};
#endif