From 2537c5bf6da4972ad5b23de2f01ad6944e3bc2bb Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 3 May 2023 17:20:06 -0400 Subject: Switch to Guile's built-in high resolution timer. --- chickadee.scm | 4 ++-- 1 file 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." -- cgit v1.2.3