From 545fb5583aee9e8971749a7eab71b4040cf7847f Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 15 May 2024 14:27:11 +0200 Subject: global-functions: $IsTimeSync: initialize with uptime... ... to make sure the warning is not issued too early. --- global-functions.rsc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/global-functions.rsc b/global-functions.rsc index f890376..3800ad5 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -685,10 +685,10 @@ :return true; } + :local Uptime [ /system/resource/get uptime ]; :if ([ :typeof $IsTimeSyncResetNtp ] = "nothing") do={ - :set IsTimeSyncResetNtp 0s; + :set IsTimeSyncResetNtp $Uptime; } - :local Uptime [ /system/resource/get uptime ]; :if ($Uptime - $IsTimeSyncResetNtp < 3m) do={ :return false; } -- cgit v1.2.3-54-g00ecf