Re: [AD] review timed-wait changes

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2008-04-08, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> Implementing on Windows might be trouble. The code above, 
> 
>     rel_msecs = timeout->abstime - now;
> 
> is incorrect if 'timeout->abstime' isn't guaranteed to be at least as
> late as 'now'.

Nevermind.  Externally, al_wait_for_event_until() would be based on
al_current_time() which accounts for wraparound.  Internally it could use
_al_cond_timeout_init() and _al_cond_timedwait() without problem.

Peter





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/