From d12a83de376eda77fd30ced89883c78430c6dd7b Mon Sep 17 00:00:00 2001 From: s-ol Date: Fri, 4 Sep 2020 11:27:42 +0200 Subject: only increment tick if IO was triggered --- alv/copilot/base.moon | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/alv/copilot/base.moon b/alv/copilot/base.moon index 9306e3c..642098b 100644 --- a/alv/copilot/base.moon +++ b/alv/copilot/base.moon @@ -104,7 +104,6 @@ class Copilot return unless @last_modules.__root COPILOT = @ - @T += 1 ok, err = @poll! if not ok @@ -114,8 +113,9 @@ class Copilot if root and root.root L\set_time 'run' ok, error = Error.try "updating", -> - root.root\poll_io! - root.root\tick! + if root.root\poll_io! + root.root\tick! + @T += 1 if not ok L\print error -- cgit v1.2.3