FastLED 3.9.7
|
Time interval checking class.
Keeps track of a time interval in order to limit how often code is executed.
Definition at line 1120 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 1126 of file lib8tion.h.
|
inline |
Constructor.
period | the time interval between triggers |
Definition at line 1129 of file lib8tion.h.
|
inline |
Get the time elapsed since the last trigger event.
Definition at line 1141 of file lib8tion.h.
|
inline |
Get the timestamp of the most recent trigger event.
Definition at line 1147 of file lib8tion.h.
|
inline |
Get the time interval between triggers.
Definition at line 1138 of file lib8tion.h.
|
inline |
Get the time until the next trigger event.
Definition at line 1144 of file lib8tion.h.
|
inline |
Get the current time according to the class' timekeeper.
Definition at line 1135 of file lib8tion.h.
|
inline |
Check if the time interval has elapsed.
Definition at line 1163 of file lib8tion.h.
|
inline |
Check if the time interval has elapsed.
Definition at line 1150 of file lib8tion.h.
|
inline |
Reset the timestamp to the current time.
Definition at line 1157 of file lib8tion.h.
|
inline |
Set the time interval between triggers.
Definition at line 1132 of file lib8tion.h.
|
inline |
Reset the timestamp so it is ready() on next call.
Definition at line 1160 of file lib8tion.h.
TIMETYPE CEveryNTime::mPeriod |
Timing interval to check.
Definition at line 1123 of file lib8tion.h.
TIMETYPE CEveryNTime::mPrevTrigger |
Timestamp of the last time the class was "ready".
Definition at line 1122 of file lib8tion.h.