This is one way of doing it but I have found that putting your time checking routine 
at the bottom of your apps event handler to be
more effective.  This way, you are checking the system time everything your event 
handler is called.

It has been my experience that generation of nilEvent's is sporadic and rates vary 
from machine to machine.  This is especially true
if you OS is patched. It does use a bit more CPU time but the trade off is worth it 
for me.

Steve

Dave Lippincott wrote:

> There is no such beast in the SDK.  You will have to program your own timers
> and its not too hard.  Add a trap for nilEvent in your form's event loop and
> change the second parameter to EvtGetEvent in your main event loop to
> generate nilEvents periodically (or for when ever you require the event).
> When your form sees a nilEvent, check the ticks or time to see if your
> timeout has expired. Some tips: the UI generates nilEvents so don't assume
> every nilEvent you see is meant for your timer.  Don't have your event
> handler return always return 'true' for every nilEvent.
> You could also use the alarm feature of the OS but its time resolution is
> not very good.
>
> -----Original Message-----
> From: Subrata Chakrabarty <[EMAIL PROTECTED]>
> To: Palm Developer Forum <[EMAIL PROTECTED]>
> Date: Thursday, May 18, 2000 12:18 PM
> Subject: Timer
>
> >How do I create a Timer in Palm . I should be able to set a timeout and it
> should do a return after that .
> >Like createtimer .
> >Regards
> >Subrata
> >
> >
> >
> >
> >
> >
> >--
> >For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/tech/support/forums/
> >
> >
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please see 
>http://www.palmos.com/dev/tech/support/forums/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to