changeset 2217:e22c7d15a504

logging fix
author drewp@bigasterisk.com
date Tue, 23 May 2023 14:44:54 -0700
parents acf1b68d031a
children 436a1fdbfe4a
files light9/collector/collector.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/light9/collector/collector.py	Tue May 23 14:43:12 2023 -0700
+++ b/light9/collector/collector.py	Tue May 23 14:44:54 2023 -0700
@@ -133,13 +133,13 @@
         outputAttrsByDevice = self._convertToOutputAttrsPerDevice(deviceAttrs)
         pendingOut = self._flattenDmxOutput(outputAttrsByDevice)
 
-        dt1 = time.time() - now
+        t2 = time.time()
 
         self._updateOutputs(pendingOut)
 
-        dt2 = time.time() - dt1
-        if dt1 > .030 or dt2 > .030:
-            log.warning("slow setAttrs: prepare %.1fms -> updateOutputs %.1fms" % (dt1 * 1000, dt2 * 1000))
+        t3 = time.time()
+        if t2 - now > .030 or t3 - t2 > .030:
+            log.warning("slow setAttrs: prepare %.1fms -> updateOutputs %.1fms" % ((t2 - now) * 1000, (t3 - t2) * 1000))
 
     def _warnOnLateRequests(self, client, now, sendTime):
         requestLag = now - sendTime