This will require use of the Win32 API functions. There are several that deal with time. One in set particular that might help you out are GetTickCount, GetSystemTime, GetSystemTimeAdjustment, SetSystemTime, and SetSystemTimeAdjustment. These API are rather simple to use.
Accessing the RTC (a BIOS) component is not quite as easy - You will have to use the API DeviceIoControl with the Interupt value for the RTC and the appropraite return STRUCTURE. You will then have to some math to convert the ticks into time. I will leave this research to you - there several Q articles that discuss DeviceIoControl none that I could find specifically about the RTC. But I didn't go through all 328 of them in the October edition of MSDN.
Good Luck
Bruce Voelp
bvoelp@if.rmci.net
Earn AS in 1976 and BS in 1986. Learn to talk with computers when the only interface was 80 column punch cards, and paper tape.