QueryPerformanceCounter and overflows

前端 未结 5 1521
北恋
北恋 2021-02-04 21:03

I\'m using QueryPerformanceCounter to do some timing in my application. However, after running it for a few days the application seems to stop functioning properly. If I simply

5条回答
  •  逝去的感伤
    2021-02-04 21:09

    Performance counters are 64-bit, so they are large enough for years of running continuously. For example, if you assume the performance counter increments 2 billion times each second (some imaginary 2 GHz processor) it will overflow in about 290 years.

提交回复
热议问题