Commit a419e945 by Vincent Pelletier

Prevent alarm tool tic regularity from drifting due to "tic" duration.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23710 20353a03-c40f-0410-a6d1-a30d3c3de9de
1 parent 984eddfd
......@@ -212,9 +212,10 @@ class AlarmTool(BaseTool):
alarmNode = current_node
if alarmNode == current_node:
global last_tic
if tick.timeTime() - last_tic >= self.interval:
now = tick.timeTime()
if now - last_tic >= self.interval:
self.tic()
last_tic = tick.timeTime()
last_tic = now
finally:
last_tic_lock.release()
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!