QueryPerformanceTimer() and QueryPerformanceFrequency(), in a while loop.
Z.
Printable View
QueryPerformanceTimer() and QueryPerformanceFrequency(), in a while loop.
Z.
full CPU usage =)Quote:
Originally posted by Zaei
QueryPerformanceTimer() and QueryPerformanceFrequency(), in a while loop.
Z.
I can't find but a compromise between the two, a loop terminated with QPT and small intervals of Sleep, if you want 40, then maybe sleep 36 milliseconds and then sleep 1 millisecond until 38 and then finally go with Zaei's methods
Use the multimedia timers, they've got an accuracy of 1ms.
Look up timeSetEvent, timeGetTime, things like that :)