如果是作提醒用的,好像不一定要多精确吧?不过timer能控制的时间范围大约为3分半左右,要做提醒用恐怕不太合适。你可以用now来记录当前时间,用difftime(意思是这个,函数名想不起来了,查查msdn吧,关于时间的)来判断两个记录时间之间的间隔,再配合timer用。你要是在timer里写的东西比较多,也比较费时,最好隔一段时间就调整一下,因为那样时间肯定准不了。

解决方案 »

  1.   

    明白了,可是你说的3分钟是什么意思。就是说timer只能计时3分钟吗?
      

  2.   

    timer的计时范围好像最大就是65535,算起来大约是1分多(刚才记错了)。它的间隔只能最大为这么大,再大就超范围了,用起来就不方便了,而且也没必要。
      

  3.   

    Windows9X下的系统时间精度只有55毫秒
    也就是有55毫秒的误差===================================================================
    The following table describes the resolution of the system timer. System Resolution 
    Windows NT 3.5 and later The system timer runs at approximately 10ms. 
    Windows NT 3.1 The system timer runs at approximately 16ms. 
    Windows 95 and later The system timer runs at approximately 55ms.