diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-09-04 09:27:42 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2025-03-02 14:24:49 +0000 |
| commit | d12a83de376eda77fd30ced89883c78430c6dd7b (patch) | |
| tree | ece19a6954a059d9b151f4689955d45d4c987ab5 | |
| parent | remove IOStreams, support optional polling in Ops (diff) | |
| download | alive-d12a83de376eda77fd30ced89883c78430c6dd7b.tar.gz alive-d12a83de376eda77fd30ced89883c78430c6dd7b.zip | |
only increment tick if IO was triggered
| -rw-r--r-- | alv/copilot/base.moon | 6 |
1 files 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 |
