comparison src/timer/win32/SDL_systimer.c @ 326:72d55d02cb47

Disabled QueryPerformanceCounter(), due to problems on Win2K
author Sam Lantinga <slouken@libsdl.org>
date Sun, 31 Mar 2002 03:34:11 +0000
parents f6ffac90895c
children a6fa62b1be09
comparison
equal deleted inserted replaced
325:1b5457c0a8ad 326:72d55d02cb47
55 { 55 {
56 /* Set first ticks value */ 56 /* Set first ticks value */
57 #ifdef USE_GETTICKCOUNT 57 #ifdef USE_GETTICKCOUNT
58 start = GetTickCount(); 58 start = GetTickCount();
59 #else 59 #else
60 #if 0 /* Apparently there are problems with QPC on Win2K */
60 if (QueryPerformanceFrequency(&hires_ticks_per_second) == TRUE) 61 if (QueryPerformanceFrequency(&hires_ticks_per_second) == TRUE)
61 { 62 {
62 hires_timer_available = TRUE; 63 hires_timer_available = TRUE;
63 QueryPerformanceCounter(&hires_start_ticks); 64 QueryPerformanceCounter(&hires_start_ticks);
64 } 65 }
65 else 66 else
67 #endif
66 { 68 {
67 hires_timer_available = FALSE; 69 hires_timer_available = FALSE;
68 timeBeginPeriod(1); /* use 1 ms timer precision */ 70 timeBeginPeriod(1); /* use 1 ms timer precision */
69 start = timeGetTime(); 71 start = timeGetTime();
70 } 72 }