Steve Austin schrieb:
> Hello everyone,
>
> It seems like if I was going to write
> code to do this I'd end up filling the message queue with timer messages,
> and most of the time the timer code would just exit, until a second actually
> passed. This kind of timer would use up 100% CPU time, and make it
> difficult to process user input (like clicking a button that closed the
> form). What's the "right" way to go about this....
You could call a function from the EventLoop. In this function you decide then whether
the second has been passed or not. Do the
appropriate settings and return to the loop. So the system can always interrupt the
process.
Use a short time constant, e.g. 5 or 10 for the EvtGetEvent and let your timer object
make the decision.
Also SysGetTimerTicksPerSecond() and GetTimerTicks() might be useful if you need to
get 1/100 sec.
Hannes Frischat
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/