Page 1 of 1

Change window timer 'timeout' value

Posted: Wed Sep 23, 2015 6:05 pm
by WilliamL
A simple question. I did a brief search for the answer but didn't come up with anything.

How do I change the 'timeout' value of a running timer? I am using this and it is working fine but I wonder if it is the most effecient way to do it? If I just use AddWindowTimer() over and over I wonder if it will cause problems?

Code: Select all

RemoveWindowTimer(#editchartwnd,#editcharttimer)
AddWindowTimer(#editchartwnd,#editcharttimer,blinkrate)

Re: Change window timer 'timeout' value

Posted: Wed Sep 23, 2015 6:20 pm
by TI-994A
WilliamL wrote:If I just use AddWindowTimer() over and over I wonder if it will cause problems?
It would, if you add too many without removing them. :wink:

Otherwise, the AddWindowTimer()/RemoveWindowTimer() function-pair is the only way to change the timeout value.

Re: Change window timer 'timeout' value

Posted: Wed Sep 23, 2015 6:27 pm
by WilliamL
Actually I'd be adding the same Timer back in (same values) over and over again. Somehow it doesn't seem to be a good idea.

Seems safest to remove then re-add the same timer. :)