当前位置: 代码迷 >> 综合 >> QueryPerformanceFrequency/QueryPerformanceCounter 获取代码精确运行时间
  详细解决方案

QueryPerformanceFrequency/QueryPerformanceCounter 获取代码精确运行时间

热度:55   发布时间:2024-01-19 06:39:53.0
	QueryPerformanceFrequency(&nFreq);QueryPerformanceCounter(&nBeginTime);Sleep(1000);QueryPerformanceCounter(&nEndTime);time = (double)(nEndTime.QuadPart - nBeginTime.QuadPart) / (double)nFreq.QuadPart;