I can't use QueryPerformanceCounter API because installed hardware doesn't support the high resolution counter as I read from its Help section.How can I prevent this problem?What do I have to install to my machine to make work this API?
Hi strongm,
I think I have made a mistake while I was using the QueryPerformanceCounter.For now it is ok and I can have the exact time that I expect.But I still don't know why there is a hardware problem when a user uses QueryPerformanceCounter.Which people can't use this API?Is it about OS?
Sorry for the delay in replying, but I've been away.
No, it is not an OS issue, it is a hardware issue. If you issue a QueryPerformanceFrequency call before using QueryPerformanceCounter (and you should use it at least once), it may return 0, which indicates a failure. Whilst you could then use GetLastError for specific info, you will normally find that the failure is caused by the fact the hardware does not actually have a high-resolution performance counter available.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.