CPU clock frequency and thus QueryPerformanceCounter wrong?

后端 未结 5 1300
灰色年华
灰色年华 2021-02-14 21:09

I am using QueryPerformanceCounter to time some code. I was shocked when the code starting reporting times that were clearly wrong. To convert the results of QPC into \"real\"

5条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-14 21:35

    Just a shot in the dark.

    On my home PC I used to have "AI NOS" or something like that enabled in the BIOS. I suspect this screwed up the QueryPerformanceCounter/QueryPerformanceFrequency APIs because although the system clock ran at the normal rate, and normal apps ran perfectly, all full screen 3D games ran about 10-15% too fast, causing, for example, adjacent lines of dialog in a game to trip on each other.

提交回复
热议问题