`
Par2: Cascading multiple timers 1998-08-01 -- Owen Brunker >In this case, it could not work because the timer event may only be executed >every minute or so. A technique that may be useful to you is one that I use for cascading multiple timers from the window timer. Window WINDOW,TIMER(10) . . END CODE . . OF EVENT:Timer TimeNow1 = CLOCK() IF TimeNow1 < TimeLastEvent1 THEN TimeNow1 += 24 Hours. IF TimeNow1 > TimeLastEvent1 + TimerInterval1 DO DoSomething1 END TimeNow2 = CLOCK() IF TimeNow2 < TimeLastEvent2 THEN TimeNow2 += 24 Hours. IF TimeNow2 > TimeLastEvent2 + TimerInterval2 DO DoSomething2 END IF KEYBOARD() DO KeyboardStuff END This will only work on a window where there are no controls requiring keyboard entry. Printed November 23, 2024, 8:13 pm This article has been viewed/printed 35293 times. |