mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-01 16:54:38 +02:00
global-functions: $IsTimeSync: initialize with uptime...
... to make sure the warning is not issued too early.
This commit is contained in:
parent
c87a7519fe
commit
545fb5583a
1 changed files with 3 additions and 3 deletions
|
@ -685,10 +685,10 @@
|
||||||
:return true;
|
:return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ :typeof $IsTimeSyncResetNtp ] = "nothing") do={
|
|
||||||
:set IsTimeSyncResetNtp 0s;
|
|
||||||
}
|
|
||||||
:local Uptime [ /system/resource/get uptime ];
|
:local Uptime [ /system/resource/get uptime ];
|
||||||
|
:if ([ :typeof $IsTimeSyncResetNtp ] = "nothing") do={
|
||||||
|
:set IsTimeSyncResetNtp $Uptime;
|
||||||
|
}
|
||||||
:if ($Uptime - $IsTimeSyncResetNtp < 3m) do={
|
:if ($Uptime - $IsTimeSyncResetNtp < 3m) do={
|
||||||
:return false;
|
:return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue