Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
15 minute delay in prg
Message
From
30/01/2008 01:55:25
Al Doman (Online)
M3 Enterprises Inc.
North Vancouver, British Columbia, Canada
 
 
To
30/01/2008 01:46:06
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01286463
Message ID:
01287010
Views:
22
>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.

Thanks for sharing this. I'm always on the lookout for high-reliability tips.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform