comparison src/timer/linux/SDL_systimer.c @ 1158:ec446adf8cb2

POSIX clock_gettime() isn't available on Linux before 2.6, and the symbol may just be flat out missing from glibc, so force use of previous gettimeofday() behaviour for now.
author Ryan C. Gordon <icculus@icculus.org>
date Tue, 11 Oct 2005 20:05:54 +0000
parents baf35853ad54
children c9b51268668f
comparison
equal deleted inserted replaced
1157:baf35853ad54 1158:ec446adf8cb2
39 for __USE_POSIX199309 39 for __USE_POSIX199309
40 Tommi Kyntola (tommi.kyntola@ray.fi) 27/09/2005 40 Tommi Kyntola (tommi.kyntola@ray.fi) 27/09/2005
41 */ 41 */
42 #if (defined _POSIX_TIMERS && _POSIX_TIMERS > 0) 42 #if (defined _POSIX_TIMERS && _POSIX_TIMERS > 0)
43 #include <time.h> 43 #include <time.h>
44 #define USE_CLOCK_GETTIME 44 /*
45 * clock_gettime() is missing in my system's glibc, and apparently isn't
46 * available before Linux kernel 2.6...you can uncomment the following
47 * define to use it, since it may be a better solution than
48 * gettimeofday() on systems that support the newer syscall. --ryan.
49 */
50 /*#define USE_CLOCK_GETTIME*/
45 #endif 51 #endif
46 52
47 #include "SDL_error.h" 53 #include "SDL_error.h"
48 #include "SDL_timer.h" 54 #include "SDL_timer.h"
49 #include "SDL_timer_c.h" 55 #include "SDL_timer_c.h"