Hi !

> > while (ggiEventPoll(vis, emKeyboard|emPointer, &start)>0)
> >   {
> >     x = ggiEventsQueued(vis, emKeyboard | emPointer);
> >     while (x)
> >        {
> >        gii_event event;
> >        ggiEventRead(vis, &event, emKeyboard | emPointer);
> >        /* do stuff */
> >        };
> >   };

> I don't see you re-setting start anywhere in the loop, so delaying
> for undefined amounts of time is indeed expected behaviour of the
> above code. 

Is it ? Our docs say

In case an event arrives, the timeout value is updated to the time that 
would have been remaining.

Which IMHO implies setting it to 0,0 if it was at 0,0 initially.

If that wasn't the case, these while()-Poll loops would be pretty ugly
to write.

The idea of such a while() is to wait quite _exactly_ for the initial amount
of time, while still reacting to incoming events immediately.

Now if that time happens to be 0,0 it shouldn't be specialcased.

We'll probably need some profiling data to debug Teunis' problem ...
I'll sort that out with him in PM.

CU, ANdy

-- 
Andreas Beck              |  Email :  <[EMAIL PROTECTED]>

Reply via email to