|
wince5.0,三星2440板子,设置定时器0,每625ms中断一次,在调试状态每次中断都是625ms左右,精确度很高,可是一把程序放到板子上跑,中断间隔很不准,每次时间如下:
DrvDispatchThread::time = 1018
DrvDispatchThread::time = 1085
DrvDispatchThread::time = 953
DrvDispatchThread::time = 888
DrvDispatchThread::time = 1150
DrvDispatchThread::time = 1085
DrvDispatchThread::time = 1019
DrvDispatchThread::time = 953
DrvDispatchThread::time = 888
DrvDispatchThread::time = 888
DrvDispatchThread::time = 1019
DrvDispatchThread::time = 953
DrvDispatchThread::time = 757
DrvDispatchThread::time = 626
DrvDispatchThread::time = 757
DrvDispatchThread::time = 625
DrvDispatchThread::time = 626
这个差的太多了,为什么在调试状态下可以达到那个精度,而在板子上单独跑却不能呢,为什么会是这样?真是好奇怪。
还有一个问题,就是我用GetTickCount得到一段时间间隔为60000ms,可对应的两次时钟(就是时分秒)相差却只有50秒左右,不知道是什么原因造成的。希望高手能帮我解答这两个问题,快把我急死了。
|
|