|
Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
Interval timer for periodic tasks. More...
#include <non_blocking_delay.hpp>
Public Member Functions | |
| IntervalTimer (uint32_t interval_ms) | |
| Constructor with interval period. | |
| void | start () |
| Start the interval timer. | |
| bool | tick () |
| Check if interval has elapsed and auto-reset. | |
| void | stop () |
| Stop the interval timer. | |
| void | setInterval (uint32_t interval_ms) |
| Update interval period. | |
| uint32_t | getInterval () const |
| Get current interval. | |
Interval timer for periodic tasks.
Similar to NonBlockingDelay but automatically resets after each period. Useful for periodic tasks like blinking LEDs, sampling sensors, etc.
| SystemTimeImpl | HAL system time implementation |
Definition at line 112 of file non_blocking_delay.hpp.
|
inlineexplicit |
Constructor with interval period.
| interval_ms | Interval period in milliseconds |
Definition at line 118 of file non_blocking_delay.hpp.
|
inline |
Get current interval.
Definition at line 163 of file non_blocking_delay.hpp.
|
inline |
Update interval period.
| interval_ms | New interval in milliseconds |
Definition at line 155 of file non_blocking_delay.hpp.
|
inline |
Start the interval timer.
Definition at line 124 of file non_blocking_delay.hpp.
|
inline |
Stop the interval timer.
Definition at line 147 of file non_blocking_delay.hpp.
|
inline |
Check if interval has elapsed and auto-reset.
Definition at line 133 of file non_blocking_delay.hpp.