On one of my forms I am trying to use the nilEvent to update a label that is
acting as a timer.  Problem is that when I run it on my T3 the timer only
updates every 5 to 6 seconds.

It appears as though either:

a) the nilEvents are getting "gobbeld" up before they get to my forms Event
Handler

or

b) nilEvents are not being generated during periods of "inactivity"

I am using EvtGetEvent(&event, 0); so according to the API reference should
generate nilEvents between other events immediately.

Anyone attempt to do a simliar thing?  I don't care if I get too many
nilEvents, it just seems I am not getting enough.

My event loop looks like this (the state==active is used to see if the timer
is activated or not):

static void EventLoop(void)
{
    Err error;
    EventType event;

    // Main event loop
    do
    {
    // Check to see if we should generate nilEvents more frequently
    if (state == active) {
        EvtGetEvent(&event, 0);
    } else {
        EvtGetEvent(&event, evtWaitForever);
    }

    if (!SysHandleEvent(&event))
    {
        if (!MenuHandleEvent(0, &event, &error))
        {
            if (!ApplicationHandleEvent(&event))
                FrmDispatchEvent(&event);
        }
    }
    while (event.eType != appStopEvent);
}



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

Reply via email to