QueryPerformanceFrequency/QueryPerformanceCounter 获取代码精确运行时间
程序员文章站
2024-01-23 17:08:16
...
QueryPerformanceFrequency(&nFreq);
QueryPerformanceCounter(&nBeginTime);
Sleep(1000);
QueryPerformanceCounter(&nEndTime);
time = (double)(nEndTime.QuadPart - nBeginTime.QuadPart) / (double)nFreq.QuadPart;
上一篇: linux内核hook技术之函数地址替换
下一篇: 算法运行时间分析