Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Loop too vicious?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00901657
Message ID:
00901836
Views:
22
As George Tasker mentioned earlier, any process that delays the loop would greatly reduce the cpu load. For instance, a 10 second delay as opposed to a no delay loop (the faster the processor the worse the problem)


>>I wanted to run this by the experts. I have overnight reports that run @ 9pm.
>>I have vfp run in a loop continuously until 9pm, then reports run, then loop continues till next nite and so forth all week. Of course this puts the processor at 100% usage. Does this cause the processor to heat up and put more wear on it/shorten it's life?
>
>Tim,
>
>I'd suggest adding a call to the Windows API Sleep function in your loop, so you could set the interval of activity at once per minute at the most. This would be the easiest way to make your application well-behaved, both with regard to any possible overheating (if that really is a practical problem), as well as leaving the machine responsive to other apps.
>
>Mike
Previous
Reply
Map
View

Click here to load this message in the networking platform