Re: [AD] rest and yield_timeslice

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


On Mon, 2004-07-19 at 07:53 -0700, Chris wrote:
> Hmm.. a few problems with the patch. First, I thought we were going to 
> use nanosleep to rest in Unix? And as well, with the unix rest method, 

No. select does just what we want (same as usleep, but usleep is
deprecated according to my docs).

> you're using clock to do timed callback. Remember, clock works with 
> process time, not system time. You need to use gettimeofday since clock 
> will invariably lose cycles on you.
> 

Good point. I copied the code from timer.c actually - so that would need
changing as well then, at least for unix. (Or do djgpp/mingw have
gettimeofday?)

> Also, I don't think you gave enough consideration for changing rest from 
> long to unsigned long. You only mentioned it in the last email (that I 
> can see), and I don't think anyone's really had a proper chance to 
> discuss it.
> 

Yes, I'm proposing it with my mail. If there are complaints against it,
we can keep long. I see no point in having a signed variable though.

-- 
Elias Pschernig





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