From 6f40c85138ebce8ba2ae45864362dcd803b6dad6 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 11 Oct 2005 17:33:03 +0000 Subject: [PATCH] =?UTF-8?q?Date:=20Tue,=2011=20Oct=202005=2016:58:12=20+03?= =?UTF-8?q?00=20(EEST)=20From:=20=3D=3FISO-8859-1=3FQ=3FMartin=5FStorsj=3D?= =?UTF-8?q?F6=3F=3D=20=20To:=20sdl@libsdl.org=20Subject:?= =?UTF-8?q?=20[SDL]=20[PATCH]=20Use=20nanosleep=20on=20OS=20X?= Hi, The current version of SDL_Delay on OS X seems to always sleep at least 10 msec. OS X has nanosleep(), which performs shorter sleeps well. The attached patch makes it use that one instead of select() as currently. // Martin --- src/timer/linux/SDL_systimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/timer/linux/SDL_systimer.c b/src/timer/linux/SDL_systimer.c index fd2545a84..33b4913b0 100644 --- a/src/timer/linux/SDL_systimer.c +++ b/src/timer/linux/SDL_systimer.c @@ -55,7 +55,7 @@ static char rcsid = /* Linux select() changes its timeout parameter upon return to contain the remaining time. Most other unixen leave it unchanged or undefined. */ #define SELECT_SETS_REMAINING -#elif defined(__bsdi__) || defined(__FreeBSD__) || defined(__sun) +#elif defined(__bsdi__) || defined(__FreeBSD__) || defined(__sun) || defined(MACOSX) #define USE_NANOSLEEP #endif