From da7486cafe8071982a2ff73097616476f1c8ec69 Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Sun, 7 Nov 2010 17:53:43 -0500 Subject: [PATCH] kvrun: show FPS every one second --- examples/kv/kvrun.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/kv/kvrun.py b/examples/kv/kvrun.py index 581bb0957..0ccc6a8a1 100644 --- a/examples/kv/kvrun.py +++ b/examples/kv/kvrun.py @@ -1,10 +1,14 @@ #!/usr/bin/env python from kivy.app import App +from kivy.clock import Clock from kivy.lang import Builder class KvApp(App): + def _print_fps(self, *largs): + print 'FPS:', Clock.get_fps() def build(self): + Clock.schedule_interval(self._print_fps, 1) return Builder.load_file(self.options['filename']) if __name__ == '__main__':