6
Time &Time::get_instance()
19
int Time::get_minutes()
25
int Time::get_seconds()
33
// how many milliseonds have elapsed since we last checked?
34
unsigned long millis = ::millis();
35
unsigned long delta = millis - _last_millis + _carry;
37
// update the previous time and carried-over milliseconds
38
_last_millis = millis;
39
_carry = delta % 1000;
41
// add the seconds that have passed to the time
42
_seconds += delta / 1000;
43
while( _seconds >= 60 ) {
46
if( _minutes >= 60 ) {
58
_last_millis( millis() ),
61
// get the time from the real-time clock
63
RTC.get( rtc_data, true );
64
_hours = rtc_data[ DS1307_HR ];
65
_minutes = rtc_data[ DS1307_MIN ];
66
_seconds = rtc_data[ DS1307_SEC ];