Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Decrease CPU Utilization
Message
 
 
À
12/08/2002 03:31:12
Jacky Yeung
Esprit Distribution
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00688497
Message ID:
00688643
Vues:
15
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform