The idea is that timeGetTime () is used quite often in an existing project (for Windows purposes).
milliseconds = timeGetTime();
Now it can be replaced by
double tmp = (double) lpPerformanceCount.QuadPart/ lpFrequency.QuadPart;
milliseconds = rint(tmp * 1000);
with lpPerformanceCount.QuadPart and lpFrequency.QuadPart are taken from using a single call to QueryPerformanceCounter () and QueryPerformanceFrequency ().
I know that the internal environment of Windows is a kind of voodoo, but can someone decipher which of the two is more accurate and / or has more overhead?
I suspect accuracy may be the same, but QueryPerformanceCounter may have less overhead. But I do not have hard data to back it up.
Of course, I will not be surprised if it is the other way around.
, , .