Explorar o código

Lower sleep duration when waiting for input

Yentl Van Tendeloo %!s(int64=8) %!d(string=hai) anos
pai
achega
1931f0fe3f
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  1. 2 3
      wrappers/modelverse.py

+ 2 - 3
wrappers/modelverse.py

@@ -111,7 +111,7 @@ def _exec_on_statechart(statechart):
                 # Expand the event and make it HTTP input
                 _input(input_event.parameters)
                 
-            time.sleep(0.01)
+            time.sleep(0.02)
         
     thrd = threading.Thread(target=_exec_sc, args=statechart)
     thrd.daemon = True
@@ -222,8 +222,7 @@ def _compile_model(code):
 def _output(expected=None):
     try:
         while len(outputs) < 2:
-            time.sleep(0.5)
-            print("Sleep for output: " + str(outputs))
+            time.sleep(0.02)
 
         del outputs[0]
         #print("[OUT] %s" % outputs[0])