From f35283b436132c1f7153ff938b490f621c7022d9 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 27 Feb 2016 13:09:59 -0500 Subject: examples: Replace schedule-interval with a signal hook. * examples/common.scm: Use add-signal-hook! instead of schedule-interval for receiving FPS events. --- examples/common.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/common.scm b/examples/common.scm index 0c54447..44dbd07 100644 --- a/examples/common.scm +++ b/examples/common.scm @@ -24,9 +24,9 @@ (add-hook! window-close-hook stop-game-loop) -(schedule-interval - (lambda () - (format #t "FPS: ~d\n" (signal-ref fps))) - 60) +(define (display-fps fps) + (format #t "FPS: ~d\n" fps)) + +(add-signal-hook! fps display-fps) ;; (start-sly-repl) -- cgit v1.2.3