slouken@1361: /* slouken@5535: Simple DirectMedia Layer slouken@9998: Copyright (C) 1997-2016 Sam Lantinga slouken@1361: slouken@5535: This software is provided 'as-is', without any express or implied slouken@5535: warranty. In no event will the authors be held liable for any damages slouken@5535: arising from the use of this software. slouken@1361: slouken@5535: Permission is granted to anyone to use this software for any purpose, slouken@5535: including commercial applications, and to alter it and redistribute it slouken@5535: freely, subject to the following restrictions: slouken@1361: slouken@5535: 1. The origin of this software must not be misrepresented; you must not slouken@5535: claim that you wrote the original software. If you use this software slouken@5535: in a product, an acknowledgment in the product documentation would be slouken@5535: appreciated but is not required. slouken@5535: 2. Altered source versions must be plainly marked as such, and must not be slouken@5535: misrepresented as being the original software. slouken@5535: 3. This notice may not be removed or altered from any source distribution. slouken@1361: */ icculus@8093: #include "../../SDL_internal.h" slouken@1361: slouken@1635: #if defined(SDL_TIMER_DUMMY) || defined(SDL_TIMERS_DISABLED) slouken@1635: slouken@1484: #include "SDL_timer.h" slouken@1484: urkle@7649: static SDL_bool ticks_started = SDL_FALSE; urkle@7649: slouken@1895: void slouken@8268: SDL_TicksInit(void) slouken@1361: { urkle@7649: if (ticks_started) { urkle@7649: return; urkle@7649: } urkle@7649: ticks_started = SDL_TRUE; slouken@1361: } slouken@1361: slouken@8268: void slouken@8268: SDL_TicksQuit(void) slouken@8268: { slouken@8268: ticks_started = SDL_FALSE; slouken@8268: } slouken@8268: slouken@1895: Uint32 slouken@1895: SDL_GetTicks(void) slouken@1361: { urkle@7649: if (!ticks_started) { slouken@8268: SDL_TicksInit(); urkle@7649: } urkle@7649: slouken@1895: SDL_Unsupported(); slouken@1895: return 0; slouken@1361: } slouken@1361: slouken@5514: Uint64 slouken@5514: SDL_GetPerformanceCounter(void) slouken@5514: { slouken@5514: return SDL_GetTicks(); slouken@5514: } slouken@5514: slouken@5514: Uint64 slouken@5514: SDL_GetPerformanceFrequency(void) slouken@5514: { slouken@5514: return 1000; slouken@5514: } slouken@5514: slouken@1895: void slouken@1895: SDL_Delay(Uint32 ms) slouken@1361: { slouken@1895: SDL_Unsupported(); slouken@1361: } slouken@1361: slouken@5111: #endif /* SDL_TIMER_DUMMY || SDL_TIMERS_DISABLED */ slouken@1361: slouken@1895: /* vi: set ts=4 sw=4 expandtab: */