RTC using the internal millis() clock, has to be initialized before use. NOTE: this is immune to millis() rollover events.
More...
#include <RTClib.h>
RTC using the internal millis() clock, has to be initialized before use. NOTE: this is immune to millis() rollover events.
◆ begin()
| void RTC_Millis::begin |
( |
const DateTime & |
dt | ) |
|
|
inline |
Start the RTC.
- Parameters
-
| dt | DateTime object with the date/time to set |
◆ adjust()
| void RTC_Millis::adjust |
( |
const DateTime & |
dt | ) |
|
Set the current date/time of the RTC_Millis clock.
- Parameters
-
| dt | DateTime object with the desired date and time |
◆ now()
Return a DateTime object containing the current date/time. Note that computing (millis() - lastMillis) is rollover-safe as long as this method is called at least once every 49.7 days.
- Returns
- DateTime object containing current time
◆ lastUnix
| uint32_t RTC_Millis::lastUnix |
|
protected |
Unix time from the previous call to now().
This, together with lastMillis, defines the alignment between the millis() timescale and the Unix timescale. Both variables are updated on each call to now(), which prevents rollover issues.
◆ lastMillis
| uint32_t RTC_Millis::lastMillis |
|
protected |
millis() value corresponding lastUnix.
Note that this is not the millis() value of the last call to now(): it's the millis() value corresponding to the last full second of Unix time preceding the last call to now().
The documentation for this class was generated from the following files: