Posts: 223
Threads: 68
Joined: Apr 2014
Reputation:
0
I can't think of using SetTimerEx & SetTimer as stopping a timer and starting it again with the same duration as I stopped. How do I do that, or if someone gives me an idea on how to do it?
Posts: 1,794
Threads: 104
Joined: Feb 2012
Reputation:
0
Well just a small idea came up to my mind not sure if it's good or not, create a variable then start every one second increase it (when the timer starts) (+1) when the timer stops, stop increasing when you wanna start another timer.
SetTimer("timer",var*1000,false/true);
Posts: 2,286
Threads: 18
Joined: Jun 2010
1. Upon SetTimerEx, store GetTickCount() in a variable, e.g. initTime
2. Upon KillTimer, set initTime to GetTickCount()-initTime
3. Upon the next SetTimerEx, just use SetTimerEx(x, interval-initTime, ...);