My update system runs every 3 hours. In Windows, I use this to control the intervals without a lot of CPU demand:
DEFINE TIMER oTmr INTERVAL 900000 OF oWnd ;
ACTION IF( ElapTime( cStart, Time()) >= "03:00:00", RunUpdater(), )
ACTIVATE TIMER oTmr
Defining a timer requires a Window, so I simply replace it with a DO WHILE .t. loop. However, I only want it to process ElapTime( ) after the interval has passed.
I was looking for the equivalent of the INTERVAL 900000 used in defining the timer, but don't exactly see one.
The routine is built in xHarbour ( commercial ) and I am doing it as a non-GUI app.
Any suggestions for a timer that won't constantly eat away at the CPU ? I thought about Seconds( ) but that is a pretty constant call. Trying to remember back to the old DOS days ...
Thanks for your input.
Tim