Jump to content

Recommended Posts

Posted

hi all

i am building a project that monitors a web page.

the program sits idle until a set time and then updates the page

which it does a few times a day.

i put the time polling routine inside the

While 1

$msg = GUIGetMsg()

...

...

WEnd

loop to insure that it will be checked but this stresses the cpu.

where do you suggest i place these routines?

if i place them outside the loop will the program continue to monitor the time event?

thanks

Posted

hi all

i am building a project that monitors a web page.

the program sits idle until a set time and then updates the page

which it does a few times a day.

i put the time polling routine inside the

While 1

$msg = GUIGetMsg()

...

...

WEnd

loop to insure that it will be checked but this stresses the cpu.

where do you suggest i place these routines?

if i place them outside the loop will the program continue to monitor the time event?

thanks

If you place a Sleep(100) after While 1 that will ease the stress on the CPU.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Posted

you cant use a larger sleep because otherwise actions will be perforemed

continuesly (or you need to program checks for one time actions)

if the actions are time based and you want them perfomed once, you need the down to the exact

second, and add a sleep for a second

Posted (edited)

GUIGetMsg() is supposed to idle the cpu. Using Sleep() is not recommended in a loop using GuiGetMsg(). I cannot advise a solution as the relevent code structure that is possibly stressing the cpu is not supplied. Supply the code where those ... are and a better chance of help can be offered. :P

Edit: more definition

Edited by MHz

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...