src/timer/windows/SDL_systimer.c
author Sam Lantinga <slouken@libsdl.org>
Thu, 02 May 2013 16:54:03 -0700
changeset 7136 65c709a5da8a
parent 6885 700f1b25f77f
child 7191 75360622e65f
permissions -rw-r--r--
QueryPerformanceCounter() is reliable these days, and setting the timer frequency higher can have adverse power consequences. http://msdn.microsoft.com/en-us/library/windows/desktop/dd757624%28v=vs.85%29.aspx
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
     1
/*
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5514
diff changeset
     2
  Simple DirectMedia Layer
6885
700f1b25f77f Happy New Year!
Sam Lantinga <slouken@libsdl.org>
parents: 6430
diff changeset
     3
  Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
     4
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5514
diff changeset
     5
  This software is provided 'as-is', without any express or implied
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5514
diff changeset
     6
  warranty.  In no event will the authors be held liable for any damages
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5514
diff changeset
     7
  arising from the use of this software.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
     8
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5514
diff changeset
     9
  Permission is granted to anyone to use this software for any purpose,
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5514
diff changeset
    10
  including commercial applications, and to alter it and redistribute it
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5514
diff changeset
    11
  freely, subject to the following restrictions:
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    12
5535
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5514
diff changeset
    13
  1. The origin of this software must not be misrepresented; you must not
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5514
diff changeset
    14
     claim that you wrote the original software. If you use this software
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5514
diff changeset
    15
     in a product, an acknowledgment in the product documentation would be
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5514
diff changeset
    16
     appreciated but is not required.
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5514
diff changeset
    17
  2. Altered source versions must be plainly marked as such, and must not be
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5514
diff changeset
    18
     misrepresented as being the original software.
96594ac5fd1a SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents: 5514
diff changeset
    19
  3. This notice may not be removed or altered from any source distribution.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    20
*/
1402
d910939febfa Use consistent identifiers for the various platforms we support.
Sam Lantinga <slouken@libsdl.org>
parents: 1361
diff changeset
    21
#include "SDL_config.h"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    22
5062
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
    23
#ifdef SDL_TIMER_WINDOWS
1635
92947e3a18db Make sure code is only compiled if the appropriate subsystem is enabled
Sam Lantinga <slouken@libsdl.org>
parents: 1497
diff changeset
    24
5090
327f181542f1 Include windows.h in a single point in the source, so we can be consistent about the definition of UNICODE and have core utility functions for Windows that all modules can share.
Sam Lantinga <slouken@libsdl.org>
parents: 5062
diff changeset
    25
#include "../../core/windows/SDL_windows.h"
5114
e337f792c6a7 Fixed compiling under Visual Studio
Sam Lantinga <slouken@libsdl.org>
parents: 5111
diff changeset
    26
#include <mmsystem.h>
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    27
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    28
#include "SDL_timer.h"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    29
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    30
#define TIME_WRAP_VALUE	(~(DWORD)0)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    31
89
69b8fac3e1c0 Added Holger Schemel's fix for SDL_GetTicks() on W2K
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
    32
/* The first (low-resolution) ticks value of the application */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    33
static DWORD start;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    34
89
69b8fac3e1c0 Added Holger Schemel's fix for SDL_GetTicks() on W2K
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
    35
#ifndef USE_GETTICKCOUNT
69b8fac3e1c0 Added Holger Schemel's fix for SDL_GetTicks() on W2K
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
    36
/* Store if a high-resolution performance counter exists on the system */
69b8fac3e1c0 Added Holger Schemel's fix for SDL_GetTicks() on W2K
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
    37
static BOOL hires_timer_available;
69b8fac3e1c0 Added Holger Schemel's fix for SDL_GetTicks() on W2K
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
    38
/* The first high-resolution ticks value of the application */
69b8fac3e1c0 Added Holger Schemel's fix for SDL_GetTicks() on W2K
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
    39
static LARGE_INTEGER hires_start_ticks;
69b8fac3e1c0 Added Holger Schemel's fix for SDL_GetTicks() on W2K
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
    40
/* The number of ticks per second of the high-resolution performance counter */
69b8fac3e1c0 Added Holger Schemel's fix for SDL_GetTicks() on W2K
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
    41
static LARGE_INTEGER hires_ticks_per_second;
69b8fac3e1c0 Added Holger Schemel's fix for SDL_GetTicks() on W2K
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
    42
#endif
69b8fac3e1c0 Added Holger Schemel's fix for SDL_GetTicks() on W2K
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
    43
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    44
void
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    45
SDL_StartTicks(void)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    46
{
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    47
    /* Set first ticks value */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    48
#ifdef USE_GETTICKCOUNT
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    49
    start = GetTickCount();
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    50
#else
7136
65c709a5da8a QueryPerformanceCounter() is reliable these days, and setting the timer frequency higher can have adverse power consequences.
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
    51
    /* QueryPerformanceCounter has had problems in the past, but lots of games 
65c709a5da8a QueryPerformanceCounter() is reliable these days, and setting the timer frequency higher can have adverse power consequences.
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
    52
       use it, so we'll rely on it here.
65c709a5da8a QueryPerformanceCounter() is reliable these days, and setting the timer frequency higher can have adverse power consequences.
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
    53
     */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    54
    if (QueryPerformanceFrequency(&hires_ticks_per_second) == TRUE) {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    55
        hires_timer_available = TRUE;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    56
        QueryPerformanceCounter(&hires_start_ticks);
7136
65c709a5da8a QueryPerformanceCounter() is reliable these days, and setting the timer frequency higher can have adverse power consequences.
Sam Lantinga <slouken@libsdl.org>
parents: 6885
diff changeset
    57
    } else {
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    58
        hires_timer_available = FALSE;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    59
        timeBeginPeriod(1);     /* use 1 ms timer precision */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    60
        start = timeGetTime();
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    61
    }
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    62
#endif
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    63
}
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    64
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    65
Uint32
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    66
SDL_GetTicks(void)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    67
{
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    68
    DWORD now, ticks;
89
69b8fac3e1c0 Added Holger Schemel's fix for SDL_GetTicks() on W2K
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
    69
#ifndef USE_GETTICKCOUNT
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    70
    LARGE_INTEGER hires_now;
89
69b8fac3e1c0 Added Holger Schemel's fix for SDL_GetTicks() on W2K
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
    71
#endif
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    72
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    73
#ifdef USE_GETTICKCOUNT
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    74
    now = GetTickCount();
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    75
#else
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    76
    if (hires_timer_available) {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    77
        QueryPerformanceCounter(&hires_now);
89
69b8fac3e1c0 Added Holger Schemel's fix for SDL_GetTicks() on W2K
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
    78
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    79
        hires_now.QuadPart -= hires_start_ticks.QuadPart;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    80
        hires_now.QuadPart *= 1000;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    81
        hires_now.QuadPart /= hires_ticks_per_second.QuadPart;
89
69b8fac3e1c0 Added Holger Schemel's fix for SDL_GetTicks() on W2K
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
    82
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    83
        return (DWORD) hires_now.QuadPart;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    84
    } else {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    85
        now = timeGetTime();
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    86
    }
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    87
#endif
89
69b8fac3e1c0 Added Holger Schemel's fix for SDL_GetTicks() on W2K
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
    88
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    89
    if (now < start) {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    90
        ticks = (TIME_WRAP_VALUE - start) + now;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    91
    } else {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    92
        ticks = (now - start);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    93
    }
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
    94
    return (ticks);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    95
}
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
    96
5514
6bd701987ba9 Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency()
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
    97
Uint64
6bd701987ba9 Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency()
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
    98
SDL_GetPerformanceCounter(void)
6bd701987ba9 Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency()
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
    99
{
6bd701987ba9 Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency()
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   100
    LARGE_INTEGER counter;
6bd701987ba9 Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency()
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   101
6bd701987ba9 Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency()
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   102
    if (!QueryPerformanceCounter(&counter)) {
6bd701987ba9 Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency()
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   103
        return SDL_GetTicks();
6bd701987ba9 Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency()
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   104
    }
6bd701987ba9 Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency()
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   105
    return counter.QuadPart;
6bd701987ba9 Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency()
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   106
}
6bd701987ba9 Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency()
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   107
6bd701987ba9 Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency()
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   108
Uint64
6bd701987ba9 Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency()
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   109
SDL_GetPerformanceFrequency(void)
6bd701987ba9 Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency()
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   110
{
6bd701987ba9 Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency()
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   111
    LARGE_INTEGER frequency;
6bd701987ba9 Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency()
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   112
6bd701987ba9 Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency()
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   113
    if (!QueryPerformanceFrequency(&frequency)) {
6bd701987ba9 Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency()
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   114
        return 1000;
6bd701987ba9 Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency()
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   115
    }
6bd701987ba9 Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency()
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   116
    return frequency.QuadPart;
6bd701987ba9 Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency()
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   117
}
6bd701987ba9 Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency()
Sam Lantinga <slouken@libsdl.org>
parents: 5262
diff changeset
   118
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
   119
void
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
   120
SDL_Delay(Uint32 ms)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   121
{
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
   122
    Sleep(ms);
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   123
}
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
   124
5062
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   125
#endif /* SDL_TIMER_WINDOWS */
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 3697
diff changeset
   126
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1635
diff changeset
   127
/* vi: set ts=4 sw=4 expandtab: */