src/timer/dummy/SDL_systimer.c
author Sam Lantinga
Fri, 25 Mar 2011 14:45:04 -0700
changeset 5514 6bd701987ba9
parent 5262 b530ef003506
child 5535 96594ac5fd1a
permissions -rw-r--r--
Added high resolution timing API: SDL_GetPerformanceCounter(), SDL_GetPerformanceFrequency()
slouken@1361
     1
/*
slouken@1361
     2
    SDL - Simple DirectMedia Layer
slouken@5262
     3
    Copyright (C) 1997-2011 Sam Lantinga
slouken@1361
     4
slouken@1361
     5
    This library is free software; you can redistribute it and/or
slouken@1361
     6
    modify it under the terms of the GNU Lesser General Public
slouken@1361
     7
    License as published by the Free Software Foundation; either
slouken@1361
     8
    version 2.1 of the License, or (at your option) any later version.
slouken@1361
     9
slouken@1361
    10
    This library is distributed in the hope that it will be useful,
slouken@1361
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@1361
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@1361
    13
    Lesser General Public License for more details.
slouken@1361
    14
slouken@1361
    15
    You should have received a copy of the GNU Lesser General Public
slouken@1361
    16
    License along with this library; if not, write to the Free Software
slouken@1361
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
slouken@1361
    18
slouken@1361
    19
    Sam Lantinga
slouken@1361
    20
    slouken@libsdl.org
slouken@1361
    21
*/
slouken@1402
    22
#include "SDL_config.h"
slouken@1361
    23
slouken@1635
    24
#if defined(SDL_TIMER_DUMMY) || defined(SDL_TIMERS_DISABLED)
slouken@1635
    25
slouken@1484
    26
#include "SDL_timer.h"
slouken@1484
    27
slouken@1895
    28
void
slouken@1895
    29
SDL_StartTicks(void)
slouken@1361
    30
{
slouken@1361
    31
}
slouken@1361
    32
slouken@1895
    33
Uint32
slouken@1895
    34
SDL_GetTicks(void)
slouken@1361
    35
{
slouken@1895
    36
    SDL_Unsupported();
slouken@1895
    37
    return 0;
slouken@1361
    38
}
slouken@1361
    39
slouken@5514
    40
Uint64
slouken@5514
    41
SDL_GetPerformanceCounter(void)
slouken@5514
    42
{
slouken@5514
    43
    return SDL_GetTicks();
slouken@5514
    44
}
slouken@5514
    45
slouken@5514
    46
Uint64
slouken@5514
    47
SDL_GetPerformanceFrequency(void)
slouken@5514
    48
{
slouken@5514
    49
    return 1000;
slouken@5514
    50
}
slouken@5514
    51
slouken@1895
    52
void
slouken@1895
    53
SDL_Delay(Uint32 ms)
slouken@1361
    54
{
slouken@1895
    55
    SDL_Unsupported();
slouken@1361
    56
}
slouken@1361
    57
slouken@5111
    58
#endif /* SDL_TIMER_DUMMY || SDL_TIMERS_DISABLED */
slouken@1361
    59
slouken@1895
    60
/* vi: set ts=4 sw=4 expandtab: */