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