diff options
author | David Thompson <dthompson2@worcester.edu> | 2016-02-27 13:09:59 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2016-02-27 13:09:59 -0500 |
commit | f35283b436132c1f7153ff938b490f621c7022d9 (patch) | |
tree | b9f9b6d91773cd73fd7d30e51561b1a025000726 /examples | |
parent | 3b47739e8224e5b26a70f5fde4f6167dbebca8e4 (diff) |
examples: Replace schedule-interval with a signal hook.
* examples/common.scm: Use add-signal-hook! instead of schedule-interval
for receiving FPS events.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/common.scm | 8 |
1 files 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) |