How can I get the Windows system time with millisecond resolution?

axilmar picture axilmar · Sep 16, 2010 · Viewed 47.4k times · Source

How can I get the Windows system time with millisecond resolution?

If the above is not possible, then how can I get the operating system start time? I would like to use this value together with timeGetTime() in order to compute a system time with millisecond resolution.

Thank you in advance.

Answer

Kevin Gale picture Kevin Gale · Sep 16, 2010

Try this article from MSDN Magazine. It's actually quite complicated.

Implement a Continuously Updating, High-Resolution Time Provider for Windows