mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
global-functions: $WaitTimeSync: calculate with modulo operation
The uptime is returned in time, with supports arithmetic modulo operation. This is three minutes in nano seconds, so multiplied 180 with 10^9.
This commit is contained in:
parent
9bd56d8aca
commit
8e6403b1be
1 changed files with 1 additions and 1 deletions
|
@ -967,7 +967,7 @@
|
||||||
|
|
||||||
:while ([ $TimeIsSync ] = false) do={
|
:while ([ $TimeIsSync ] = false) do={
|
||||||
:if ([ :len [ / system script find where name="rotate-ntp" ] ] > 0 && \
|
:if ([ :len [ / system script find where name="rotate-ntp" ] ] > 0 && \
|
||||||
[ :tostr [ / system resource get uptime ] ] ~ "[369]:00\$") do={
|
([ / system resource get uptime ] % (180 * 1000000000)) = 0s) do={
|
||||||
:do {
|
:do {
|
||||||
/ system script run rotate-ntp;
|
/ system script run rotate-ntp;
|
||||||
} on-error={
|
} on-error={
|
||||||
|
|
Loading…
Reference in a new issue