WaitForSingleObject()精度 [英] WaitForSingleObject() accuracy

查看:93
本文介绍了WaitForSingleObject()精度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我使用了WaitForSingleObject函数,并让我的线程休眠了将近24小时(以毫秒为单位).
但是我注意到线程在目标时间之前15秒醒了(没有信号!).

是什么原因导致这种早期唤醒?

提前谢谢..
Nir.

Hi,

i use the function WaitForSingleObject, and let my thread to sleep for almost 24 hours (in milliseconds).
However I''ve noticed that the thread woke up 15 seconds before the destination time (it was not signaled!).

what might have caused this early wake up?

Thanks in advance..
Nir.

推荐答案

精确度与准确性不同 [ ^ ]-基本上,它后面的计时器不是很准确.
Precision is not the same as accuracy[^] - basically, the timer behind it isn''t very accurate.


是Xp还是Vista?
如果是Vista,则可能是HPET.
Is it Xp or Vista?
If it is Vista then HPET might be the cause.


这篇关于WaitForSingleObject()精度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆