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:
Christian Hesse 2020-10-09 16:00:09 +02:00
parent 9bd56d8aca
commit 8e6403b1be

View file

@ -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={