Run code once timer reaches X seconds.
Run code once timer reaches X seconds.
Found nothing on Google.
Re: Run code once timer reaches X seconds.
Please post some code you've tried and be very specific about what you're trying to do.
- flyingDman
- Posts: 2832
- Joined: 29 Sep 2013, 19:01
Re: Run code once timer reaches X seconds.
Basically, I wanna have some code be executed every 200ms. The issue is that block of code doesn't take the same amount of time to execute every time, so I wanna start a timer before the code is executed, execute the code, then once timer reaches 200ms, execute again.
Re: Run code once timer reaches X seconds.
That is how a timer works.
The documentation as already noted above contains additional details and suggestions.
Code: Select all
#Persistent
start := A_TickCount
SetTimer, Go, 1000
Return
Go:
list .= A_TickCount - start "`n"
ToolTip, %list%
Sleep, 200
Return