Commit a419e945 authored by Vincent Pelletier's avatar 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
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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment