Code: Select all
4::
starttime:=A_TickCount
DllCall("QueryPerformanceFrequency", "Int64*", freq)
DllCall("QueryPerformanceCounter", "Int64*", CounterBefore)
sleep 1
sleep 1
sleep 1
sleep 1
sleep 1
sleep 1
DllCall("QueryPerformanceCounter", "Int64*", CounterAfter)
MsgBox % "Elapsed QPC time is " . (CounterAfter - CounterBefore) / freq * 1000 " ms"
return
This thread sleep for 6ms (total , sleep 1 X 6) but it it end up return 80-93ms in total...
For further testing
sleep 1X3 = 32-44ms
sleep 3 = 3-13ms
sleep 1x6 = 80-93ms
sleep 3x2 = 19-33ms
sleep 6 = 1(?!) - 18ms
I may not feel the different during the game play ... but still the timing is off(a lot)...
Is something wrong here or am i misunderstand to something ?
![Crazy :crazy:](./images/smilies/icon_crazy.gif)