46
// milliseconds at last update
47
static unsigned long _last_millis = millis();
49
// milliseconds carries over from last update
50
static unsigned long _carry = 0;
53
static void probe_rtc()
28
Time &Time::get_instance()
55
// get the time from the real-time clock
57
RTC.get( rtc_data, true );
58
_year = rtc_data[ DS1307_YR ];
59
_month = rtc_data[ DS1307_MTH ];
60
_day = rtc_data[ DS1307_DAY ];
61
_hours = rtc_data[ DS1307_HR ];
62
_minutes = rtc_data[ DS1307_MIN ];
63
_seconds = rtc_data[ DS1307_SEC ];
144
_last_millis( millis() ),
151
void Time::probe_rtc()
153
// get the time from the real-time clock
155
RTC.get( rtc_data, true );
156
_year = rtc_data[ DS1307_YR ];
157
_month = rtc_data[ DS1307_MTH ];
158
_day = rtc_data[ DS1307_DAY ];
159
_hours = rtc_data[ DS1307_HR ];
160
_minutes = rtc_data[ DS1307_MIN ];
161
_seconds = rtc_data[ DS1307_SEC ];