Not quite. You should check the time each time you get an event, regardless
of the type of event. The timeout just guarantees that you will be invoked
by any event at about the right time, not that it will be a nil event.
Ed Deinstadt
-----Original Message-----
From: Stuart Norton <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Wednesday, July 14, 1999 12:37 PM
Subject: RE: Automated serial output


Dave,

If the EvtGetEvent times out, it generates a 'nilEvent' right? Do I just
stick another case statement right under the EvtGetEvent to handle this?
Does it matter where?

Stuart Norton


-----Original Message-----
From: Dave Lippincott [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 14, 1999 4:23 PM
To: [EMAIL PROTECTED]
Subject: Re: Automated serial output


You're going to have to fudge it.  Set your app to generate the nilEvent
event with at least 2x the required frequency and check the ticks (or the
clock) to see if it is time to perform your task.  I have not found a
reliable way to generate a periodic event at an *exact* interval (and still
use the OS API's).  You could also look into using the alarm manager, but an
event every 2 seconds may not be worth the overhead.  Several developers
have posted numerous help messages on this topic in the past months, you can
search egroups for their answers.

D

-----Original Message-----
From: Stuart Norton <[EMAIL PROTECTED]>
To: Palm Developers Forum List (E-mail) <[EMAIL PROTECTED]>
Date: Wednesday, July 14, 1999 10:36 AM
Subject: Automated serial output


Hi,

Just a quickie to those in the know: How do I call a function every 2
seconds no matter what's happening in my app. I presume there's a command to
post regular events of a certain type onto the queue, that can then be
handled however I want. If so, what is this?

Thanks

Stuart Norton









Reply via email to