DWORD tStart = GetTickCount();
//需要测试的代码
DWORD tEnd = GetTickCount();
DWORD t = tEnd - tStart;
CString strTime;
strTime.Format(_T("\n耗时%lu\n"),t);
OutputDebugString(strTime);
C++计算函数耗时并输出
最新推荐文章于 2024-03-01 16:07:54 发布
DWORD tStart = GetTickCount();
//需要测试的代码
DWORD tEnd = GetTickCount();
DWORD t = tEnd - tStart;
CString strTime;
strTime.Format(_T("\n耗时%lu\n"),t);
OutputDebugString(strTime);