From 5b965d180a1f536affd51ffc2b51d5e90fbc362d Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 15 Dec 2020 17:39:01 -0500 Subject: Add SDL_GetPerformanceCounter and SDL_GetPerformanceFrequency bindings. --- sdl2.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sdl2.scm') diff --git a/sdl2.scm b/sdl2.scm index 53eef74..32d7e84 100644 --- a/sdl2.scm +++ b/sdl2.scm @@ -35,6 +35,8 @@ sdl-init sdl-quit sdl-ticks + sdl-performance-counter + sdl-performance-frequency make-color @@ -94,6 +96,14 @@ upon all exit conditions." initialized." (ffi:sdl-get-ticks)) +(define (sdl-performance-counter) + "Return the current value of the high resolution counter." + (ffi:sdl-get-performance-counter)) + +(define (sdl-performance-frequency) + "Return the count per second of the high resolution counter." + (ffi:sdl-get-performance-frequency)) + ;; SDL_Color (define-record-type (make-color r g b a) -- cgit v1.2.3