如何更精确sleep Topic is solved
Posted: 20 Jun 2022, 11:14
如何更精确sleep,求解。
已知AHK自身的sleep精度到10ms就差不多了,如果我们要提高sleep精度到1ms,该如何做
已知AHK自身的sleep精度到10ms就差不多了,如果我们要提高sleep精度到1ms,该如何做
Let's help each other out
https://www.autohotkey.com/boards/
https://www.autohotkey.com/boards/viewtopic.php?f=27&t=105578
Code: Select all
TimePeriod = 1
DllCall("Winmm\timeBeginPeriod", UInt, TimePeriod)
Sleep(value)
sleep(duration)
{
SleepDuration:= duration ;
DllCall("Sleep", UInt, SleepDuration) ;
DllCall("WinmmtimeEndPeriod", UInt, TimePeriod) ;
}