Update the code to implement a basic RTC.