Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How many timers are TOO MANY?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00926585
Message ID:
00926713
Views:
19
>Well, I have a LED class, for example with 2 timers, one that controls the fading and other the blinking, and I put lot's of them in one form to test, and i can use more than 10 LEDS (20 timers) with no problem, eventhough the 'fading timer' has a very fast rate, but...

>Although I would have no problem having multiple timers doing something trivial like the LED, I would be very weary of using more than one timer to handle the same data (or diferent tables of related data). Keep in mind that the way the timers work (As far as I know) is that when one timer fires, it stops the execution of any other code, even other timers, runs it's code, then returns to the where it was, for example other timer's code, so your data will be in an non defined state


Interesting...

Ok, I did a test. I created a blank form with two timers on it. One timer was set to 10 seconds (interval=10000) and the following code is in it.
WAIT WINDOW AT 0,1 "TIMER1"
The second timer is set to 1 second and has the following code.
WAIT WINDOW ALLTRIM(TIME()) nowait
Now the interesting thing is that when timer one fires it only stays up for one second and then timer 2 fires even though the wait window on timer one should stop the process. Maybe Wait windows are not the best way to test this but it appears that timer two fires even though timer one is executing a wait window.

I will try Jim's point of 4 timers and see if this makes a difference...
Kevin Scott
kehvn@carolina.rr.com


Hey! It's not my fault. It's some General named Protection!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform