From d40937b46795285ac8385a1a2194ad71bb806497 Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Wed, 27 Apr 2022 16:06:30 -0400 Subject: [PATCH] this was supposed to be in that pr merge oops --- scada-common/util.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scada-common/util.lua b/scada-common/util.lua index 11b258e..69bc7f1 100644 --- a/scada-common/util.lua +++ b/scada-common/util.lua @@ -39,10 +39,15 @@ end -- PARALLELIZATION -- +-- protected sleep call so we still are in charge of catching termination +function psleep(t) + pcall(os.sleep, t) +end + -- no-op to provide a brief pause (and a yield) -- EVENT_CONSUMER: this function consumes events function nop() - sleep(0.05) + psleep(0.05) end -- WATCHDOG --