windowstimetime-precisionhigh-resolution-clockhigh-resolution-time

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


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.


Solution

  • GetTickCount will not get it done for you.

    Look into QueryPerformanceFrequency / QueryPerformanceCounter. The only gotcha here is CPU scaling though, so do your research.