summaryrefslogtreecommitdiff
path: root/chickadee.scm
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2023-05-03 17:20:06 -0400
committerDavid Thompson <dthompson2@worcester.edu>2023-05-03 17:20:06 -0400
commit2537c5bf6da4972ad5b23de2f01ad6944e3bc2bb (patch)
tree1500a83a05d0ef61f8ad2f762eef7d11021dccc1 /chickadee.scm
parentb7f0593e56307e98e7a1e0ad767eef64109673a9 (diff)
Switch to Guile's built-in high resolution timer.
Diffstat (limited to 'chickadee.scm')
-rw-r--r--chickadee.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/chickadee.scm b/chickadee.scm
index 5342e9e..3022a52 100644
--- a/chickadee.scm
+++ b/chickadee.scm
@@ -78,11 +78,11 @@
#:re-export (abort-game
current-timestep))
-(define %time-freq (exact->inexact (sdl-performance-frequency)))
+(define %time-freq (exact->inexact internal-time-units-per-second))
(define (elapsed-time)
"Return the current value of the system timer in seconds."
- (/ (sdl-performance-counter) %time-freq))
+ (/ (get-internal-real-time) %time-freq))
(define (key-pressed? key)
"Return #t if KEY is currently being pressed."