C++一个很好的计时方法
//记时
LARGE_INTEGER t1;
LARGE_INTEGER t2;
LARGE_INTEGER f;
QueryPerformanceFrequency(&f);
QueryPerformanceCounter(&t1);
Sleep(100);
QueryPerformanceCounter(&t2);
double time;
time = (double)(t2.QuadPart-t1.QuadPart)/(double)f.QuadPart;
time *= 1000;
CString tep;
tep.Format(_T("耗时:%f") , time);
SetDlgItemText(IDC_STATIC,tep);