Mac and Linux SDL2 binary snapshots
Edward Rudd
2020-05-02 4e3209e407d334dabb8b58cd5a21a5c6c65f5ef4
include/SDL2/SDL_timer.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -19,8 +19,8 @@
  3. This notice may not be removed or altered from any source distribution.
*/
#ifndef _SDL_timer_h
#define _SDL_timer_h
#ifndef SDL_timer_h_
#define SDL_timer_h_
/**
 *  \file SDL_timer.h
@@ -43,6 +43,17 @@
 * \note This value wraps if the program runs for more than ~49 days.
 */
extern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void);
/**
 * \brief Compare SDL ticks values, and return true if A has passed B
 *
 * e.g. if you want to wait 100 ms, you could do this:
 *  Uint32 timeout = SDL_GetTicks() + 100;
 *  while (!SDL_TICKS_PASSED(SDL_GetTicks(), timeout)) {
 *      ... do work until timeout has elapsed
 *  }
 */
#define SDL_TICKS_PASSED(A, B)  ((Sint32)((B) - (A)) <= 0)
/**
 * \brief Get the current value of the high resolution counter
@@ -77,7 +88,7 @@
/**
 * \brief Add a new timer to the pool of timers already running.
 *
 * \return A timer ID, or NULL when an error occurs.
 * \return A timer ID, or 0 when an error occurs.
 */
extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval,
                                                 SDL_TimerCallback callback,
@@ -99,6 +110,6 @@
#endif
#include "close_code.h"
#endif /* _SDL_timer_h */
#endif /* SDL_timer_h_ */
/* vi: set ts=4 sw=4 expandtab: */