Mercurial > sdl-ios-xcode
comparison src/timer/linux/SDL_systimer.c @ 1336:3692456e7b0f
Use SDL_ prefixed versions of C library functions.
FIXME:
Change #include <stdlib.h> to #include "SDL_stdlib.h"
Change #include <string.h> to #include "SDL_string.h"
Make sure nothing else broke because of this...
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 07 Feb 2006 06:59:48 +0000 |
parents | 9439c2f1da89 |
children | c71e05b4dc2e |
comparison
equal
deleted
inserted
replaced
1335:c39265384763 | 1336:3692456e7b0f |
---|---|
254 int SDL_SYS_TimerInit(void) | 254 int SDL_SYS_TimerInit(void) |
255 { | 255 { |
256 struct sigaction action; | 256 struct sigaction action; |
257 | 257 |
258 /* Set the alarm handler (Linux specific) */ | 258 /* Set the alarm handler (Linux specific) */ |
259 memset(&action, 0, sizeof(action)); | 259 SDL_memset(&action, 0, sizeof(action)); |
260 action.sa_handler = HandleAlarm; | 260 action.sa_handler = HandleAlarm; |
261 action.sa_flags = SA_RESTART; | 261 action.sa_flags = SA_RESTART; |
262 sigemptyset(&action.sa_mask); | 262 sigemptyset(&action.sa_mask); |
263 sigaction(SIGALRM, &action, NULL); | 263 sigaction(SIGALRM, &action, NULL); |
264 return(0); | 264 return(0); |
283 | 283 |
284 void SDL_SYS_StopTimer(void) | 284 void SDL_SYS_StopTimer(void) |
285 { | 285 { |
286 struct itimerval timer; | 286 struct itimerval timer; |
287 | 287 |
288 memset(&timer, 0, (sizeof timer)); | 288 SDL_memset(&timer, 0, (sizeof timer)); |
289 setitimer(ITIMER_REAL, &timer, NULL); | 289 setitimer(ITIMER_REAL, &timer, NULL); |
290 } | 290 } |
291 | 291 |
292 #else /* USE_ITIMER */ | 292 #else /* USE_ITIMER */ |
293 | 293 |