FastLED 3.9.3
|
Time interval checking class.
Keeps track of a time interval in order to limit how often code is executed.
Definition at line 1125 of file lib8tion.h.
#include <lib8tion.h>
Public Member Functions | |
CEveryNTime () | |
Default constructor. | |
CEveryNTime (TIMETYPE period) | |
Constructor. | |
void | setPeriod (TIMETYPE period) |
Set the time interval between triggers. | |
TIMETYPE | getTime () |
Get the current time according to the class' timekeeper. | |
TIMETYPE | getPeriod () |
Get the time interval between triggers. | |
TIMETYPE | getElapsed () |
Get the time elapsed since the last trigger event. | |
TIMETYPE | getRemaining () |
Get the time until the next trigger event. | |
TIMETYPE | getLastTriggerTime () |
Get the timestamp of the most recent trigger event. | |
bool | ready () |
Check if the time interval has elapsed. | |
void | reset () |
Reset the timestamp to the current time. | |
void | trigger () |
Reset the timestamp so it is ready() on next call. | |
operator bool () | |
Check if the time interval has elapsed. | |
Public Attributes | |
TIMETYPE | mPrevTrigger |
Timestamp of the last time the class was "ready". | |
TIMETYPE | mPeriod |
Timing interval to check. | |
|
inline |
Default constructor.
Definition at line 1131 of file lib8tion.h.
|
inline |
Constructor.
period | the time interval between triggers |
Definition at line 1134 of file lib8tion.h.
|
inline |
Get the time elapsed since the last trigger event.
Definition at line 1146 of file lib8tion.h.
|
inline |
Get the timestamp of the most recent trigger event.
Definition at line 1152 of file lib8tion.h.
|
inline |
Get the time interval between triggers.
Definition at line 1143 of file lib8tion.h.
|
inline |
Get the time until the next trigger event.
Definition at line 1149 of file lib8tion.h.
|
inline |
Get the current time according to the class' timekeeper.
Definition at line 1140 of file lib8tion.h.
|
inline |
Check if the time interval has elapsed.
Definition at line 1168 of file lib8tion.h.
|
inline |
Check if the time interval has elapsed.
Definition at line 1155 of file lib8tion.h.
|
inline |
Reset the timestamp to the current time.
Definition at line 1162 of file lib8tion.h.
|
inline |
Set the time interval between triggers.
Definition at line 1137 of file lib8tion.h.
|
inline |
Reset the timestamp so it is ready() on next call.
Definition at line 1165 of file lib8tion.h.
TIMETYPE CEveryNTime::mPeriod |
Timing interval to check.
Definition at line 1128 of file lib8tion.h.
TIMETYPE CEveryNTime::mPrevTrigger |
Timestamp of the last time the class was "ready".
Definition at line 1127 of file lib8tion.h.