HotkeylessAHK icon indicating copy to clipboard operation
HotkeylessAHK copied to clipboard

SetTimer not compatible

Open bodesattva opened this issue 4 years ago • 0 comments

I'm having an issue with SetTimer. No matter what I set for the period, it takes ~25047ms to complete. I'm guessing (wildly) the problem is due to AHKs single threading and the loop in RunClient() not allowing SetTimer to inturrupt. I used the following code to test. If I kill the server while the timer is running, the timer will immediately complete.

` global start

HelloWorld() { start := A_TickCount SetTimer, ElapsedTime, -1000, 2147483647 }

ElapsedTime(){ MsgBox, % A_TickCount - start }`

bodesattva avatar Apr 15 '21 03:04 bodesattva