diff options
Diffstat (limited to 'turtetris_master/__init__.py')
-rw-r--r-- | turtetris_master/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/turtetris_master/__init__.py b/turtetris_master/__init__.py index b389525..d6d8bdc 100644 --- a/turtetris_master/__init__.py +++ b/turtetris_master/__init__.py @@ -1,3 +1,4 @@ +import sys import time from .led_output import Matrix from .usb_input import Gamepad @@ -12,11 +13,12 @@ def main(): while True: tstart = time.time() sm.tick() - trest = (1/60) - (time.time() - tstart) + trest = (1/30) - (time.time() - tstart) if trest > 0: time.sleep(trest) else: print("Output took too long!!") + sys.stdout.flush() if __name__ == '__main__': |