# HG changeset patch # User Kim Alvefur # Date 1462723541 -7200 # Node ID 7be158b3376fcd57d521cb41a3d74b3c2176cb58 # Parent d15df55f0a6359a46ff151897b515662434e51d8 mod_log_mark: Try to prevent timer drift diff -r d15df55f0a63 -r 7be158b3376f mod_log_mark/mod_log_mark.lua --- a/mod_log_mark/mod_log_mark.lua Sun May 08 16:57:44 2016 +0200 +++ b/mod_log_mark/mod_log_mark.lua Sun May 08 18:05:41 2016 +0200 @@ -2,7 +2,7 @@ local log = _G.log; -module:add_timer(60-os.date("%S"), function () +module:add_timer(60-os.date("%S"), function (now) log("info", "-- MARK --"); - return 60; + return 90 - ((now + 30) % 60); end);