kvrun: show FPS every one second

This commit is contained in:
Mathieu Virbel 2010-11-07 17:53:43 -05:00
parent bb891ef2de
commit da7486cafe
1 changed files with 4 additions and 0 deletions

View File

@ -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__':