a very simple timer
More...
#include <Noiasca_timer.h>
a very simple timer
I just wanted a very simple minimalistic timer. But I propose to use the LittleTimer instead. The main difference is that this timere has no callback functions
- See also
- LittleTimer
◆ hasTriggered()
uint16_t MiniTimer::hasTriggered |
( |
| ) |
|
|
inline |
indicate if timer has been triggered
- Returns
- > 0 if interval time is passed since last call. Returns the number of "missed" intervals.
◆ hasEnded()
bool MiniTimer::hasEnded |
( |
| ) |
|
|
inline |
indicate if timer has been ended
- Returns
- true if interval time is over.
◆ start()
void MiniTimer::start |
( |
| ) |
|
|
inline |
start timer
starts the timer.
◆ stop()
stop timer
stops the timer.
◆ getState()
byte MiniTimer::getState |
( |
| ) |
|
|
inline |
get the state of the timer
- Returns
- the current state of the timer
◆ setLimit()
void MiniTimer::setLimit |
( |
uint32_t |
limit | ) |
|
|
inline |
get the limit of the timer
- Parameters
-
limit | how often should the timer fire |
◆ setIteration()
void MiniTimer::setIteration |
( |
uint32_t |
iteration | ) |
|
|
inline |
set the iteration
Modify the counter of iterations.
- Parameters
-
iteration | how often has the timer fired |
◆ getIteration()
uint32_t MiniTimer::getIteration |
( |
| ) |
|
|
inline |
get the iteration
Returns the current number of ioterations.
- Returns
- interations of how often the timer has fired.
◆ update()
void MiniTimer::update |
( |
uint32_t |
currentMillis = millis() | ) |
|
|
inline |
run method
call this function in your loop()