Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Decrease CPU Utilization
Message
 
 
To
12/08/2002 03:31:12
Jacky Yeung
Esprit Distribution
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00688497
Message ID:
00688643
Views:
16
Jacky,

It sounds like you've got code like:
do while .t.
   lnNextExecution = datetime() + 600
   do while datetime() < lnNextExecution
   enddo
   DoTheRealThing()
enddo
Well, that's were all your CPU utilization is being consumed. Use the Sleep() API
do while .t.
   doevents
   Sleep(60000)
   DoTheRealThing()
enddo
Or maybe even just use the Task Scheduler of Win2k to simply launch and run your app every 10 minutes.

>Is there any way to control the CPU utilization when running a Foxpro application.
>
>It is because when i run a Foxpro application in Win2K server, the CPU usuage always go
>
>to 100%. As a result, the other applications become very slow or even stop. Therefore,
>
>can i control it.
>
>I know i can set the priority in Task manager but my Foxpro application schedule to run every 10 mins. So i can't do that
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform