Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How many timers are TOO MANY?
Message
 
À
21/07/2004 12:19:39
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00926585
Message ID:
00926657
Vues:
17
>>I didn't do it yet; but I think that the basic approach, to combine timers, would be something like this: have a single Timer that ticks every second or minute, or whatever (depending on the maximum resolution required), and at every "tick" (Timer() Event), checks a cursor or array, which would contain the sort of information you need in a Timer: Interval; next execution; code to execute (method or procedure name).

>>It seems to me that a cursor, indexed on the next execution date-time, has the potential to be the faster alternative, if you need to combine many Timers.

Hmmm...Here's my concern. Let's say timer 1 should fire every 10 seconds and timer 2 every 1 second. If I put these in the same timer control and the code from timer 1 executes and it takes 3 seconds then the code from timer 2 won't fire until timer 1 code is done. Now multiply this by 8 timers. Does that make sense??
Kevin Scott
kehvn@carolina.rr.com


Hey! It's not my fault. It's some General named Protection!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform