Easy to do with almost all RTC and a external EEPROM, or skip the RTC and use ElapsedTimer example.