implement software rtc