Thank you. I used this method and it worked. The only thing I changed was to set EVENTSPERSECOND to 2. The time would keep skipping seconds in the emulator.

Harald Schlangmann wrote:
Ben,
implement an event loop like this:


        do {
                handled = false;
                        
                EvtGetEvent (&event, (long)SysTicksPerSecond
()/EVENTSPERSECOND);

                handled = SysHandleEvent (&event);
                if (!handled)
                {
                        handled = MenuHandleEvent (0, &event, &error);
                        if (!handled)
                        {
                                handled = AppHandleEvent (&event);
                                if (!handled)
                                        handled = FrmDispatchEvent (&event);
                        }
                }

        } while (handled||event.eType!=appStopEvent);

with EVENTSPERSECOND==1 and implement the update of your timer by consuming
the nilEvent that will be posted once a second.

Grüße, Harald

-
Harald Schlangmann
harald.schlangm...@netcologne.de
http://www.gps-laptimer.de


-----Ursprüngliche Nachricht-----
Von: Ben Rittgers [mailto:britt...@mchsi.com] Gesendet: Mittwoch, 10. Dezember 2008 06:48
An: Palm Developer Forum
Betreff: Implimenting a countdown timer

I was to have a timer on my form. It will count down. I have made a form that has my seconds minutes and hours in separate fields. I can update the timer fields by tapping on a form button, but I would like to have the code automatically count down.

In what event should I put my code to update the fields every second? It runs like a clock so I need to update it every second.

Benjamin Rittgers
http://writerbenjamin.com


--
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to