From 8e6403b1bedd837485d86641aed2013abc4cc7f0 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 9 Oct 2020 16:00:09 +0200 Subject: [PATCH] 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. --- global-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global-functions b/global-functions index d51f1d3..366804a 100644 --- a/global-functions +++ b/global-functions @@ -967,7 +967,7 @@ :while ([ $TimeIsSync ] = false) do={ :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 { / system script run rotate-ntp; } on-error={