精确统计程序运行时间

#include <time.h> LARGE_INTEGER startCount; LARGE_INTEGER endCount; LARGE_INTEGER freq; QueryPerformanceFrequency(&freq); QueryPerformanceCounter(&startCount); QueryPerformanceCounter(&endCount); double elapsed = (double)(endCount.QuadPart - startCount.QuadPart) / freq.QuadPart; cout<< "Total time for init : " << elapsed << endl; 

你可能感兴趣的:(精确统计程序运行时间)