Convert rtc.cpp to rtc.c