123456789101112131415161718
__int64 iCountsPerSec; __int64 iTime_StartProcessing; __int64 iTime_EndProcessing; double dMSecPerCount; double dMSeconds_ProcessingTime; QueryPerformanceFrequency((LARGE_INTEGER*)&iCountsPerSec); dMSecPerCount = 1000.0/(double)iCountsPerSec; QueryPerformanceCounter((LARGE_INTEGER*)&iTime_StartProcessing); //... (perform processing) QueryPerformanceCounter((LARGE_INTEGER*)&iTime_EndProcessing); dMSeconds_ProcessingTime = (iTime_EndProcessing - iTime_StartProcessing)*dMSecPerCount;