CString str_time;
long t1 = GetTickCount();///程序段开始前取得系统运行时间(ms)
//程序段
long t2 = GetTickCount();//程序段结束后取得系统运行时间(ms)
str_time.Format(“time:%dms”, t2 - t1);//前后之差即程序运行时间
AfxMessageBox(str_time);
CString str_time;
long t1 = GetTickCount();///程序段开始前取得系统运行时间(ms)
//程序段
long t2 = GetTickCount();//程序段结束后取得系统运行时间(ms)
str_time.Format(“time:%dms”, t2 - t1);//前后之差即程序运行时间
AfxMessageBox(str_time);