#include <AH/Timing/MillisMicrosTimer.hpp>
A class for easily managing timed events.
A wrapper for "Blink Without Delay".
| time | The time function to use. |
Definition at line 23 of file MillisMicrosTimer.hpp.
Collaboration diagram for Timer< time >:Public Member Functions | |
| Timer (unsigned long interval) | |
| Constructor. | |
| void | begin () |
| Initialize or reset the timer. The timer will fire immediately. | |
| void | beginNextPeriod () |
| Initialize or reset the timer. The timer will fire after one period. | |
| operator bool () | |
| Update the timer and return true if the event should fire. | |
| unsigned long | getInterval () const |
| Get the interval of the timer. | |
| void | setInterval (unsigned long interval) |
| Set the interval of the timer. | |
Private Attributes | |
| unsigned long | interval |
| unsigned long | previous = 0 |
|
inline |
Constructor.
| interval | The interval between two events. |
Definition at line 30 of file MillisMicrosTimer.hpp.
|
inline |
Initialize or reset the timer. The timer will fire immediately.
Definition at line 36 of file MillisMicrosTimer.hpp.
|
inline |
Initialize or reset the timer. The timer will fire after one period.
Definition at line 38 of file MillisMicrosTimer.hpp.
|
inlineexplicit |
Update the timer and return true if the event should fire.
Definition at line 40 of file MillisMicrosTimer.hpp.
|
inline |
Get the interval of the timer.
Definition at line 50 of file MillisMicrosTimer.hpp.
|
inline |
Set the interval of the timer.
Definition at line 52 of file MillisMicrosTimer.hpp.
|
private |
Definition at line 55 of file MillisMicrosTimer.hpp.
|
private |
Definition at line 56 of file MillisMicrosTimer.hpp.