First off, passing 0 is 'wait forever' for an event. Second, any value you pass may still cause the device to go into doze mode. If you need your app to remain 'awake', pass some number other than 0 to EvtGetEvent and periodically called EvtResetAutoOffTimer.
----- Original Message ----- From: "Regis St-Gelais" <[EMAIL PROTECTED]> Newsgroups: palm-dev-forum To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Thursday, April 08, 2004 7:59 PM Subject: Re: EvtEventAvail unreliable?! > The device fall into sleep while it is waiting for an event inside the > EvtGetEvent. If the timeout is at 0 it never fall into sleep mode. > > -- > Regis St-Gelais > www.laubrass.com > -- > "Jan Slodicka" <[EMAIL PROTECTED]> a �crit dans le message de > news:[EMAIL PROTECTED] > > That's not true. Test on nilEvent will prevent that. > > > > Jan Slodicka > > > > ----- Original Message ----- > > From: "Regis St-Gelais" <[EMAIL PROTECTED]> > > Newsgroups: palm-dev-forum > > To: "Palm Developer Forum" <[EMAIL PROTECTED]> > > Sent: Thursday, April 08, 2004 3:37 PM > > Subject: Re: EvtEventAvail unreliable?! > > > > > > > > > > > > > "Jan Slodicka" <[EMAIL PROTECTED]> a �crit dans le message de > > > news:[EMAIL PROTECTED] > > > > > > <snip> > > > > Perhaps this should be replaced by > > > > > > > > while( true ) > > > > { > > > > EvtGetEvent(&event, 0); > > > > if( event.eType == nilEvent ) > > > > break ; > > > > // do something... > > > > } > > > > > > > > Seems to be smaller and safer code. (By "safer" I mean that it does > not > > > > introduce unnecessary delays in the situations when they are to be > > > avoided.) > > > > > > > <snip> > > > > > > This loop will reduce the battery life as the device will never go to > > sleep > > > between events. > > > > > > -- > > > Regis St-Gelais > > > www.laubrass.com > > > -- > > > > > > > > > > > > -- > > > For information on using the Palm Developer Forums, or to unsubscribe, > > please see http://www.palmos.com/dev/support/forums/ > > > > > > > > -- > For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
