Timer class is used to create timers to trigger actions after certain interval, can be used to setup both one time trigger or regular intervals.
Import it using:
Timer object using the default constructor
Then, to start the timer, call
void timer.start(uint32_t delay);
for example, to start the timer for 500 milliseconds:
Once started, to check when the timer is over:
This will return
true if timer is over, else will return
To set up timer to repeat at intervals, just call
start with the same time period again when it gets over.