I have found an interesting issue in windows which allows me to cause the Windows clock (but not the hardware clocks) to run fast – as much as 8 seconds every minute. I am doing some background research to work out how Windows calculates and updates it’s internal time (not how it syncs with an NTP servers). Any information anyone has or any documents you can point me to would be greatly appreciated!
Also, if anyone knows how _ftime works please let me know.
This MSDN article gives a very brief description of how the system time is handled: ‘When the system first starts, it sets the system time to a value based on the real-time clock of the computer and then regularly updates the time.’ Another interesting function is GetSystemTimeAdjustment, which has this to say:
Finally, in regard to _ftime, it appears to be implemented using GetSystemTimeAsFileTime. So it would wrap directly onto the same built-in time facilities as would be used everywhere else.