[SDL] Why not nanosleep()?

Dido Sevilla dido at pacific.net.ph
Mon Apr 3 20:09:46 PDT 2000


Maxim Sobolev wrote:
> 
> Hi,
> 
> I'm wondering why the SDL library doesn't use POSIX conformant nanosleep()
> function in its SDL_Delay() routine. Currently select() used for this purpose,
> which IMHO looks like hammering nails using computer keyboard...
> 
> I have patches at hand, so it someone will want to commit them please let me
> know.
> 

nanosleep(2) is a POSIX.1b feature.  Linux doesn't completely support
POSIX.1b, and neither does any version of Windows I have used (know
nothing about W2K, though).  If it doesn't exist on all platforms, then
it's trouble for portability.

-- 
------------------------------------------------------------------------
| Rafael R. Sevilla                                dido at pacific.net.ph |
|           Instrumentation, Robotics, and Control Laboratory          |
|    College of Engineering, University of the Philippines, Diliman    |
------------------------------------------------------------------------



More information about the SDL mailing list