Mercurial > sdl-ios-xcode
comparison src/timer/macos/SDL_systimer.c @ 1659:14717b52abc0 SDL-1.3
Merge trunk-1.3-3
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 17 May 2006 08:18:28 +0000 |
parents | 92947e3a18db |
children | 782fd950bd46 |
comparison
equal
deleted
inserted
replaced
1658:e49147870aac | 1659:14717b52abc0 |
---|---|
34 #include "SDL_timer.h" | 34 #include "SDL_timer.h" |
35 #include "../SDL_timer_c.h" | 35 #include "../SDL_timer_c.h" |
36 | 36 |
37 #include "FastTimes.h" | 37 #include "FastTimes.h" |
38 | 38 |
39 #if TARGET_API_MAC_CARBON | |
40 #define NewTimerProc NewTimerUPP | |
41 #endif | |
42 | |
39 #define MS_PER_TICK (1000.0/60.0) /* MacOS tick = 1/60 second */ | 43 #define MS_PER_TICK (1000.0/60.0) /* MacOS tick = 1/60 second */ |
40 | 44 |
41 | 45 |
42 #define kTwoPower32 (4294967296.0) /* 2^32 */ | 46 #define kTwoPower32 (4294967296.0) /* 2^32 */ |
43 | 47 |
65 { | 69 { |
66 Uint32 stop, now; | 70 Uint32 stop, now; |
67 | 71 |
68 stop = SDL_GetTicks() + ms; | 72 stop = SDL_GetTicks() + ms; |
69 do { | 73 do { |
74 #if TARGET_API_MAC_CARBON | |
75 MPYield(); | |
76 #else | |
70 SystemTask(); | 77 SystemTask(); |
78 #endif | |
71 | 79 |
72 now = SDL_GetTicks(); | 80 now = SDL_GetTicks(); |
73 | 81 |
74 } while ( stop > now ); | 82 } while ( stop > now ); |
75 } | 83 } |