global-functions: $IsTimeSync: initialize with uptime...

... to make sure the warning is not issued too early.
This commit is contained in:
Christian Hesse 2024-05-15 14:27:11 +02:00
parent c87a7519fe
commit 545fb5583a

View file

@ -685,10 +685,10 @@
:return true;
}
:if ([ :typeof $IsTimeSyncResetNtp ] = "nothing") do={
:set IsTimeSyncResetNtp 0s;
}
:local Uptime [ /system/resource/get uptime ];
:if ([ :typeof $IsTimeSyncResetNtp ] = "nothing") do={
:set IsTimeSyncResetNtp $Uptime;
}
:if ($Uptime - $IsTimeSyncResetNtp < 3m) do={
:return false;
}