1 #ifndef VARIABLETIMEDACTION_H 2 #define VARIABLETIMEDACTION_H 31 void start(
unsigned long startInterval,
bool startNow =
true);
60 unsigned long interval;
61 unsigned long nextTick;
65 static int maxActions;
74 virtual unsigned long run() = 0;
void stop()
Stops the timer, removing it from the list of actions.
Definition: VariableTimedAction.cpp:67
This class is used as an interface to create a timed loop to perform repetitive actions.
Definition: VariableTimedAction.h:17
void start(unsigned long startInterval, bool startNow=true)
Starts the timer and sets the interval that the #run method should be called.
Definition: VariableTimedAction.cpp:12
bool isRunning()
Returns current status of the timer.
Definition: VariableTimedAction.h:42
void toggleRunning()
Toggles the timer on and off.
Definition: VariableTimedAction.cpp:58
static void updateActions()
Iterates through all actions and calls the #run method on actions whose interval has passed...
Definition: VariableTimedAction.cpp:85