Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Background process using vfp
Message
From
27/03/2003 05:30:55
 
 
To
27/03/2003 03:07:04
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00770636
Message ID:
00770660
Views:
11
John,

1) I have never heard of VFP timer affecting the system clock. We have VFP systems that use timers and that run 24/7 and I have never seen this - ever. Have you got a sample app that you could post to test this effect?

2) Why would a loop be too "expensive"? Loops are only very processor intensive if the loop runs without a wait state somewhere in it. How often do you need this process to run? For example, if you need it every 5 minutes you could do:
DO WHILE condition

  ...
  your processing here
  ...

  
  * Wait State ...

  =INKEY(nSeconds)  && VFP function

  * or use ...

  =SLEEP(nMilliSeconds)  && Windows API as Viv has explained

ENDDO
>Hi,
>I would like to implement a background process. It should run a set of procedure intervally.
>
>At first, I think of having timer object in a hidden form. However, I found that timer will slow down the system clock. In my experience, it slow the system clock down about 1 hour after run for 24 hours.
>
>Then, i think to use LOOP, but it is too "expensive".
>
>Are there any workaround?
>
>Thank you
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Reply
Map
View

Click here to load this message in the networking platform