这好像是VC力不能及的,因为Windows不是个实时操作系统。也想听听高手怎么说,关注。

解决方案 »

  1.   

    用QueryPerformanceFrequency      LARGE_INTEGER freq,time1,time2;         if(!QueryPerformanceFrequency(&freq))         { 
                    AfxMessageBox("QueryPerformanceFrequency() error"); 
            }         QueryPerformanceCounter(&time1); 
    //      bit.DeDirty(dlg.m_InputData,pMFrm);//dosomething 
            QueryPerformanceCounter(&time2); 
            CString strTmp; 
            strTmp.Format("%f",(double)(time2.QuadPart-time1.QuadPart)/(double)freq.QuadPart); 
            AfxMessageBox(strTmp); 使用这三个函数所得到的时间精度于操作系统有关 
      

  2.   

    要定时的话可通过select()函数进行,也可以到ms级。