Link to home
Start Free TrialLog in
Avatar of JohnDoeSr
JohnDoeSr

asked on

Least resource hogging way to have a program 'sleep' until specified times

I normally use 'doevents' in a loop to have a program wait for a specified trigger but judging by the program's CPU usage while it's waiting, this isn't the best way to go.

I need to have a program trigger and record text on a webpage every 1/2 hour. I've thought about using Windows Scheduled TAsks to do this, but the lowest time denomination you can repeatedly run a program is once daily.

It'd be nice to have the program open and left that way while it waits every 1/2 hour to record text on the webpage without using as many CPUs as 'doevents' does. Any suggestions?
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JohnDoeSr
JohnDoeSr

ASKER

Awesome. Both answers are very informative. Will split the points.