[SDL] Why not nanosleep()?

Daniel Vogel 666 at grafzahl.de
Mon Apr 3 07:18:02 PDT 2000


Daniel Vogel wrote:
> 
> I did a 1000 x 1 ms sleep with 'sleep' == usleep it took 20 secs and
> with select only 10. Then I did try a 100x 10 ms sleep and it took 2
> seconds with select. Looks as if select takes about 10ms more than I
> want :( Well, at least it performs better than usleep.

Ups, timed the wrong one... usleep was the one that took 2 seconds and
select was taking about 1 sec. Well, the 1000x1ms still takes 10 secs
with select here but at least it works perfectly with a resolution of
more than 10ms whereof usleep even fails on such a high granularity.

-- 
Daniel Vogel                           My opinions may have changed,
666 @ http://grafzahl.de               but not the fact that I am right



More information about the SDL mailing list