void device_rtc_interface::advance_seconds() { m_register[RTC_SECOND]++; if (m_register[RTC_SECOND] == 60) { m_register[RTC_SECOND] = 0; advance_minutes(); } else { clock_updated(); } }
void device_rtc_interface::adjust_seconds() { int seconds = get_clock_register(RTC_SECOND); set_clock_register(RTC_SECOND, 0); if (seconds >= 30) { advance_minutes(); } else { clock_updated(); } }
inline void msm5832_device::advance_seconds() { int seconds = read_counter(REGISTER_S1); seconds++; if (seconds > 59) { seconds = 0; advance_minutes(); } write_counter(REGISTER_S1, seconds); }