buenzliai/main/timer.h
2024-05-17 16:20:45 +02:00

18 lines
310 B
C++

#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();
};