|
LSH-Core
A robust C++ framework for Arduino-based home automation nodes
|
Time utility to keep track of time around the code. More...
Functions | |
| auto | getTime () -> const uint32_t & |
Gets the cached timestamp from the last timeKeeper::update() call. | |
| __attribute__ ((always_inline)) inline void update() | |
| Update stored time to real time. | |
| auto | getRealTime () -> uint32_t |
Gets the current time directly by calling millis(). | |
Variables | |
| uint32_t | now = 0U |
| Stored time. | |
Time utility to keep track of time around the code.
|
inline |
Gets the current time directly by calling millis().
Use this when a fresh, non-cached timestamp is required.
millis().
|
inline |
Gets the cached timestamp from the last timeKeeper::update() call.
This avoids multiple calls to millis() within the same loop iteration, ensuring consistency.
