you can retrieve system frequencies, starting point frequency count and current frequency count. Use current frequency count minus starting point frequency count, then divide by system frequency, you can get the accurate time cost.
GetTickCount
The GetTickCount function retrieves the number of milliseconds that have elapsed since the system was started. It is limited to the resolution of the system timer. If you need a higher resolution timer, use amultimedia timer or a high-resolution timer.
DWORD GetTickCount(VOID)
Parameters
This function has no parameters.
Return Values
The return value is the number of milliseconds that have elapsed since the system was started.