summaryrefslogtreecommitdiff
path: root/chickadee.scm
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2020-11-16 17:24:04 -0500
committerDavid Thompson <dthompson2@worcester.edu>2020-11-16 17:27:10 -0500
commit526a67146ae88b3f120ed64ec95d0af07ce2be82 (patch)
treef3faeab9609dc1afda7490090e8ef4c80c70f215 /chickadee.scm
parentba0c8932395a05187824ce2835eb33331967a45a (diff)
Add elapsed-time procedure.
Diffstat (limited to 'chickadee.scm')
-rw-r--r--chickadee.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/chickadee.scm b/chickadee.scm
index 10085ae..e2d8624 100644
--- a/chickadee.scm
+++ b/chickadee.scm
@@ -63,6 +63,7 @@
set-window-size!
set-window-position!
set-window-fullscreen!
+ elapsed-time
controller-button-pressed?
controller-button-released?
controller-axis
@@ -76,6 +77,11 @@
run-game)
#:re-export (abort-game))
+(define (elapsed-time)
+ "Return the number of milliseconds that have passed since the game
+loop was started."
+ (sdl-ticks))
+
(define (key-pressed? key)
"Return #t if KEY is currently being pressed."
(sdl2:key-pressed? key))