summaryrefslogtreecommitdiff
path: root/sdl2.scm
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-12-12 02:54:04 -0500
committerDavid Thompson <dthompson2@worcester.edu>2015-12-12 02:54:04 -0500
commit313e28f1f8aaa1c9b56ae0ddbda979b790237690 (patch)
tree497447b77bd81fcb70b9bcdb0c403b12306209d2 /sdl2.scm
parent254ea1eea9c70620524ec0d3bd238cf0b535321d (diff)
Add SDL_GetTicks binding.
* sdl2/bindings.scm (sdl-get-ticks): New procedure. * sdl2.scm (sdl-ticks): New procedure.
Diffstat (limited to 'sdl2.scm')
-rw-r--r--sdl2.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/sdl2.scm b/sdl2.scm
index afed5c0..74839fe 100644
--- a/sdl2.scm
+++ b/sdl2.scm
@@ -32,7 +32,8 @@
sdl-error
sdl-version
sdl-init
- sdl-quit))
+ sdl-quit
+ sdl-ticks))
(define %default-init-flags
'(timer audio video haptic game-controller events))
@@ -77,3 +78,8 @@ The possible flags are 'timer', 'audio', 'video', 'haptic',
"Quit all activated SDL subsystems. This procedure should be called
upon all exit conditions."
(ffi:sdl-quit))
+
+(define (sdl-ticks)
+ "Return the number of milliseconds since the SDL library
+initialization."
+ (ffi:sdl-get-ticks))