Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Network:
Windows 2000 Server
Al,
>>>Or, you could use a VFP timer control, and set its .Interval property to 900000 (900,000 milliseconds, equal to 900 seconds or 15 minutes).
>>
>>The more you have to be certain of the exact time of restart, the more I'ld argue for a faster timer (say around 100-10000ms) checking clock time against a start time as a property. 9000 timer wakeups and checks is nothing making the cpu load twitch...
>
>Interesting point. Have you had any experiences with long-running timers being inaccurate?
We encountered a situation were a single long-duration timer did not *always* cause re-start at expected time - caught it in testing but never found a decent explanation what was happening. Logged correct timer settings at setup, but wakeup did not always happen. Convoluted app including a few OCX and sometimes DDE, so analysing in depth was not done/wished for, only a quick check over by 3 pairs of other eyes usually quick to spot errors and nobody saw a mistake. Working with a task semaphore and firing until work was clearly running at least guaranteed the behaviour wished for - a "fix" seen from project spec but not from code understanding<g>.
>
>I would have thought that, internally, a timer control would already be doing exactly what you propose - record the start time, then periodically check the RTC. But, if it's a "dumb" timer that's just counting clock ticks, I suppose it could be inaccurate if the ticks are not accurate or not consistent.
As the timer does not interrupt running fox code (supposedly queing timer events) and I have NO idea what happens when the app is executing OCX code I made the above my usual pattern since then. Takes minimal amount of code.
regards
thomas
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement