sebinside / HotkeylessAHK

Using the power of AutoHotkey - without hotkeys!
MIT License
87 stars 9 forks source link

SetTimer not compatible #10

Open bodesattva opened 3 years ago

bodesattva commented 3 years ago

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 }`