From dbe1891988b182c2a96c6cfe3a97de95bc94ed5e Mon Sep 17 00:00:00 2001 From: Justin Skiles Date: Thu, 29 Aug 2013 23:20:39 -0400 Subject: [PATCH] Adding methods to map to SDL_Delay and SDL_GetTicks in SDL_systimer.h --- src/SDL2.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/SDL2.cs b/src/SDL2.cs index b619d9d..95da479 100644 --- a/src/SDL2.cs +++ b/src/SDL2.cs @@ -4602,6 +4602,21 @@ namespace SDL2 public static extern void SDL_UnlockAudioDevice(uint dev); #endregion + + #region SDL_systimer.h + + /* system timers rely on different OS mechanisms depending on which + * OS the library is compiled against */ + + /* delays the thread's processing based on the milliseconds parameter */ + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern void SDL_Delay(UInt32 ms); + + /* returns the milliseconds that have passed since SDL was initialized */ + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern UInt32 SDL_GetTicks(); + + #endregion } }