以下の内容はhttps://yohhoy.hatenadiary.jp/entry/20190810/p1より取得しました。


フライングWindows API待機関数

Windows APIタイムアウト指定待機関数では、指定期間よりも僅かに早くタイムアウト発生する。この振る舞いは仕様通り(by design)とのこと。

  • WaitForSingleObject, WaitForSingleObjectEx
  • WaitForMultipleObjects, WaitForMultipleObjectsEx
  • MsgWaitForMultipleObjects, MsgWaitForMultipleObjectsEx
  • etc.

Windows OSのデフォルトタイマ割込間隔は 64 [Hz]=15.625 [msec] となっているため、平均的に数ミリ秒だけ早くタイムアウトが発生しうる。

Wait Functions and Time-out Intervals
The accuracy of the specified time-out interval depends on the resolution of the system clock. The system clock "ticks" at a constant rate. If the time-out interval is less than the resolution of the system clock, the wait may time out in less than the specified length of time. If the time-out interval is greater than one tick but less than two, the wait can be anywhere between one and two ticks, and so on.

https://docs.microsoft.com/windows/win32/sync/wait-functions

関連URL




以上の内容はhttps://yohhoy.hatenadiary.jp/entry/20190810/p1より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14