summaryrefslogtreecommitdiff
path: root/chickadee.scm
diff options
context:
space:
mode:
Diffstat (limited to 'chickadee.scm')
-rw-r--r--chickadee.scm9
1 files changed, 5 insertions, 4 deletions
diff --git a/chickadee.scm b/chickadee.scm
index e00b2b1..611674a 100644
--- a/chickadee.scm
+++ b/chickadee.scm
@@ -77,10 +77,11 @@
run-game)
#:re-export (abort-game))
+(define %time-freq (exact->inexact (sdl-performance-frequency)))
+
(define (elapsed-time)
- "Return the number of milliseconds that have passed since the game
-loop was started."
- (sdl-ticks))
+ "Return the current value of the system timer in seconds."
+ (/ (sdl-performance-counter) %time-freq))
(define (key-pressed? key)
"Return #t if KEY is currently being pressed."
@@ -390,7 +391,7 @@ border is disabled, otherwise it is enabled.")
(run-game* #:update update-sdl
#:render render-sdl-opengl
#:error error
- #:time sdl-ticks
+ #:time elapsed-time
#:update-hz update-hz)))
(lambda ()
(quit-audio)