mirror of
https://github.com/Ryujinx/SDL2-CS.git
synced 2025-03-04 13:40:01 +00:00
Finish SDL_timer.h
This commit is contained in:
parent
f284899867
commit
34d66997f0
25
src/SDL2.cs
25
src/SDL2.cs
|
@ -5413,7 +5413,7 @@ namespace SDL2
|
|||
|
||||
#endregion
|
||||
|
||||
#region SDL_systimer.h
|
||||
#region SDL_timer.h
|
||||
|
||||
/* System timers rely on different OS mechanisms depending on
|
||||
* which operating system SDL2 is compiled against.
|
||||
|
@ -5435,6 +5435,29 @@ namespace SDL2
|
|||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern UInt32 SDL_GetTicks();
|
||||
|
||||
/* Get the current value of the high resolution counter */
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern UInt64 SDL_GetPerformanceCounter();
|
||||
|
||||
/* Get the count per second of the high resolution counter */
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern UInt64 SDL_GetPerformanceFrequency();
|
||||
|
||||
/* param refers to a void* */
|
||||
public delegate UInt32 SDL_TimerCallback(UInt32 interval, IntPtr param);
|
||||
|
||||
/* int refers to an SDL_TimerID, param to a void* */
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int SDL_AddTimer(
|
||||
UInt32 interval,
|
||||
SDL_TimerCallback callback,
|
||||
IntPtr param
|
||||
);
|
||||
|
||||
/* id refers to an SDL_TimerID */
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern SDL_bool SDL_RemoveTimer(int id);
|
||||
|
||||
#endregion
|
||||
|
||||
#region SDL_syswm.h
|
||||
|
|
Loading…
Reference in a new issue