VC++编程时,经常会监控某个算法的计算时间,以确定算法的效率。编码举例如下,1 //========start: algorithm time=============2 //3 SYSTEMTIME st1;4 GetLocalTime(&st1);//获取算法处理前,系统时间5 //6 //========start: algorithm time=============。。。。。。。。// algorithm processing 1 //========end: algorithm time============= 2 ... Read More
posted @ 2013-06-18 18:09 vranger Views(478) Comments(0) Diggs(0)
vc 获取当前时间(2010-02-10 11:34:32)http://wenku.baidu.com/view/6ade96d049649b6648d7475e.html1.使用CTime类CString str;//获取系统时间CTime tm;tm=CTime:: GetCurrentTime_r();str=tm.Format("现在时间是%Y年%m月%d日 %X");MessageBox(str,NULL,MB_OK);2: 得到系统时间日期(使用GetLocalTime)SYSTEMTIME st;CString strDate,strTime;GetLoca Read More
posted @ 2013-06-18 13:11 vranger Views(514) Comments(0) Diggs(0)