buenzliai/main/timer.h

19 lines
310 B
C
Raw Normal View History

#pragma once
#include <Arduino.h>
class Timer {
private:
unsigned long duration;
bool autoRestart;
unsigned long currentTime;
unsigned long endTime;
bool running;
public:
Timer(unsigned long duration, bool autoRestart);
void start();
bool update(unsigned long delta);
bool isRunning();
};