From 74dd2eb94d8aebe74da9c21bd0175140a6afedb0 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 15 Feb 2014 20:27:09 -0500 Subject: Print FPS to stdout in examples. * examples/common.scm: Use (2d fps) module. --- examples/common.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/examples/common.scm b/examples/common.scm index 0c380f2..760ce2f 100644 --- a/examples/common.scm +++ b/examples/common.scm @@ -1,5 +1,7 @@ -(use-modules (2d keyboard) +(use-modules (2d agenda) + (2d fps) (2d game) + (2d keyboard) (2d window) (2d repl server)) @@ -10,3 +12,9 @@ (quit-game)))) (add-hook! window-close-hook quit-game) + +(schedule-interval game-agenda + (lambda () + (display (fps)) + (newline)) + 60) -- cgit v1.2.3