Change window timer 'timeout' value

Mac OSX specific forum
WilliamL
Addict
Addict
Posts: 1224
Joined: Mon Aug 04, 2008 10:56 pm
Location: Seattle, USA

Change window timer 'timeout' value

Post 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)
MacBook Pro-M1 (2021), Sonoma 14.4.1, PB 6.10LTS M1
User avatar
TI-994A
Addict
Addict
Posts: 2512
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: Change window timer 'timeout' value

Post 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.
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
WilliamL
Addict
Addict
Posts: 1224
Joined: Mon Aug 04, 2008 10:56 pm
Location: Seattle, USA

Re: Change window timer 'timeout' value

Post 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. :)
MacBook Pro-M1 (2021), Sonoma 14.4.1, PB 6.10LTS M1
Post Reply