?????????????????????????
SetTimer(20?? 20?? 0); //?????20??????????????????????20??????????????????????ù????0???ɡ?
void CLMS511_interfaceDlg::OnTimer(UINT_PTR nIDEvent)
{
// TODO: Add your message handler code here and/or call default
if(nIDEvent == 20)   //???20??????20.
{
DrawData();
if(MySSocket.StopFlag)
SendServer();
}
CDialog::OnTimer(nIDEvent);
}
KillTimer(20);  //?????????20??????
?????????
????SetTimer()???????????????????????????????????0?????????????????????????????????λ?????.??????????????????NULL??
???????WM_TIMER???????????ó????????????У???CWnd???????
???????? SetTimer(1??1??NULL)?????????1????
???????????????????????????
????Windows API
????SetTimer(HWND??UNIT??UINT??TIMERPROC);
????????????:
????1.??????????????
????2.???
????3.???????
????4.????????????
????CWnd???
????CWnd::SetTimer
????UINT SetTimer(
????UINT nIDEvent??    //???????????
????UINT nElapse??    //???????????
????void (CALLBACK EXPORT* lpfnTimer)(
????HWND?? UINT?? UINT?? DWORD) );
??????????C++????β???????????е???????:
????unsigned long ticks1??ticks2;
????????????????д??
????ticks1 = GetTickCount();
???????????????д??
????ticks2 = GetTickCount();
????ticks2-ticks1?????????
???????????????Winbase.h
?????????????????????????????????
????<time.h> ?汾
????clock_t start = clock();
????/*code to be tested*/
????clock_t end   = clock();
????cout<<end - start<<endl;
????????????汾??????????????????????????????????????????ms????
????????????????????????????TRACE????
????TRACE("????%d"??m_DIST[i]);//???????????????
?????????????????%s???????е?????滻??address????????%d?滻?????WSAGetLastError()??????????
???????巭???????Server "address" Can't Find Code="WSAGetLastError()"
??????????д??????????????????????????????????????TRACE????????
???????????????????????sleep????????????????windows.h