Quote:
What's the difference among
AccuSleep(),
QPX() and Delay()?
Delay() never sleeps... It peaks out processor owing to the Loop used.
Using it for 5 seconds as in '
Delay( 5.000 )' will keep the processor peaked for the whole 5 seconds..
Delay() is best used to induce an accurate wait period, less than 50ms.
Anything more than 50ms is not worth the processor strain.
Sleep command Vs
DllCall( "Sleep", .. )
AHK's
Sleep is a wonderful command, It is
asynchronous and keeps the processor at peace.
The only drawback is that the wait period will never be accurate.
Refer Documentation
DllCall( "Sleep", .. ) offers same functionality as
Sleep but is
Synchronous. Never use it!
The following snippet demonstrates synchronous vs asynchronous sleep:
Code:
Gui, Show, w480 h240, Sleep 5000 active`, you may move the window
Sleep 5000
Gui, Show,, DllCall( "Sleep"`,UInt`,5000 ) active`, you CANNOT move the window
DllCall( "Sleep", UInt,5000 )
Gui, Show,, GUI Normal now
AccuSleep()
AccuSleep() is a combination of AHK's Sleep command and Delay()
It first uses Sleep command to induce a 'processor friendly' wait state
and then, for correcting the inaccuracy,
it runs a high-speed loop which will be for a short period less than 50ms
