How to get an accurate 1ms Timer Tick under WinXP

后端 未结 3 2005
谎友^
谎友^ 2020-12-17 20:27

I try to call a function every 1 ms. The problem is, I like to do this with windows. So I tried the multimediatimer API.

Multimediatimer API

Source

<
3条回答
  •  别那么骄傲
    2020-12-17 20:49

    You can try to run timeBeginPeriod(1) at the program start and timeEndPeriod(1) before quitting. This probably can enhance timer precision.

提交回复
热议问题