How to realise long-term high-resolution timing on windows using C++?

后端 未结 4 759
臣服心动
臣服心动 2020-12-18 07:19

I need to get exact timestamps every couple of ms (20, 30, 40ms) over a long period of time (a couple of hours). The function in which the timestamp is taken is invoked as a

4条回答
  •  难免孤独
    2020-12-18 07:50

    You'll be hard pressed to find anything better than QueryPerformanceTimer() on Windows.

    On modern hardware it uses the HPET as a source which replaces the RTC interrupt controller. I would expect QueryPerformanceTimer() and the System clock to be synchronous.

提交回复
热议问题