comparison src/timer/os2/SDL_systimer.c @ 3838:45e566003276 SDL-ryan-multiple-audio-device

This file probably got corrupted by a pretty printer at some point...
author Ryan C. Gordon <icculus@icculus.org>
date Sun, 08 Oct 2006 08:55:14 +0000
parents c121d94672cb
children 866052b01ee5
comparison
equal deleted inserted replaced
3837:7c9663fb0860 3838:45e566003276
63 hires_now *= 1000; 63 hires_now *= 1000;
64 hires_now /= hires_ticks_per_second; 64 hires_now /= hires_ticks_per_second;
65 */ 65 */
66 /* inline asm to avoid runtime inclusion */ 66 /* inline asm to avoid runtime inclusion */
67 _asm { 67 _asm {
68 push edx 68 push edx
69 push eax 69 push eax
70 mov eax, dword ptr hires_now 70 mov eax, dword ptr hires_now
71 mov edx, dword ptr hires_now + 4 71 mov edx, dword ptr hires_now + 4
72 sub eax, dword ptr hires_start_ticks 72 sub eax, dword ptr hires_start_ticks
73 sbb edx, dword ptr hires_start_ticks + 4 73 sbb edx, dword ptr hires_start_ticks + 4
74 mov ebx, 1000 74 mov ebx, 1000
75 mov ecx, edx 75 mov ecx, edx
76 mul ebx 76 mul ebx
77 push eax 77 push eax
78 push edx 78 push edx
79 mov eax, ecx 79 mov eax, ecx
80 mul ebx 80 mul ebx
81 pop eax 81 pop eax
82 add edx, eax 82 add edx, eax
83 pop eax 83 pop eax
84 mov ebx, dword ptr hires_ticks_per_second 84 mov ebx, dword ptr hires_ticks_per_second
85 div ebx mov dword ptr ticks, eax pop edx pop eax} 85 div ebx
86 mov dword ptr ticks, eax
87 pop edx
88 pop eax
89 }
86 90
87 return ticks; 91 return ticks;
88 92
89 } 93 }
90 94
176 180
177 /* Data to handle a single periodic alarm */ 181 /* Data to handle a single periodic alarm */
178 static int timer_alive = 0; 182 static int timer_alive = 0;
179 static SDL_Thread *timer = NULL; 183 static SDL_Thread *timer = NULL;
180 184
181 static int 185 static int SDLCALL
182 RunTimer(void *unused) 186 RunTimer(void *unused)
183 { 187 {
184 DosSetPriority(PRTYS_THREAD, PRTYC_TIMECRITICAL, 0, 0); 188 DosSetPriority(PRTYS_THREAD, PRTYC_TIMECRITICAL, 0, 0);
185 while (timer_alive) { 189 while (timer_alive) {
186 if (SDL_timer_running) { 190 if (SDL_timer_running) {