From 3483c3374d9670d8f66e228e98ab886dc0b6ba61 Mon Sep 17 00:00:00 2001 From: l_samenv Date: Fri, 2 Dec 2022 09:10:07 +0100 Subject: [PATCH] allow pollinterval = 0 --- secop/modules.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/secop/modules.py b/secop/modules.py index 78f5b13..5d52955 100644 --- a/secop/modules.py +++ b/secop/modules.py @@ -722,7 +722,10 @@ class Module(HasAccessibles): for mobj in modules: pinfo = mobj.pollInfo if now > pinfo.last_main + pinfo.interval: - pinfo.last_main = (now // pinfo.interval) * pinfo.interval + if pinfo.interval: + pinfo.last_main = (now // pinfo.interval) * pinfo.interval + else: + pinfo.last_main = now mobj.callPollFunc(mobj.doPoll) now = time.time() # find ONE due slow poll and call it