[SDL] Why not nanosleep()?

Nicholas Vining vining at pacificcoast.net
Tue Apr 4 08:28:51 PDT 2000


-----Original Message-----
From: Daniel Vogel <666 at grafzahl.de>
To: sdl at lokigames.com <sdl at lokigames.com>
Date: Tuesday, April 04, 2000 7:04 AM
Subject: Re: [SDL] Why not nanosleep()?


>Nicholas Vining wrote:
>>
>> Huh. What's the resolution of the internal Pentium timers? It's gotta be
>> better than SDL's current resolution, and if that's really important, we
>> could go that route and start doing things that way. I have improved
>> resolution timer code for both x86 Pentium machines and Mac PPCs, if
anybody
>> wants.
>
>That would result in a 'busy wait'... The trick is you want the system
>to suspend your task for the time you sleep so we can't change code in
>SDL to achieve this :) One thing that could be done is that when the
>argument to sleep is less than 10ms (on i386) it could do a busy wait,
>but I don't think this would be a good idea...


True, it would be a busy wait. Damn. Silly idea from a fellow who's used to
programming in DOS for too long and ignoring things, forget I mentioned it
;-)

>Daniel Vogel                           My opinions may have changed,


Cheers,

Nicholas
--
Nicholas Vining         "While you're out there struggling
vining at pacificcoast.net  with your computer, I'm naked,
icq: 20872003            clueless, and feeling good!"
                                         - Ratbert






More information about the SDL mailing list