diff options
author | Christian Hesse <mail@eworm.de> | 2020-10-09 16:00:09 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2020-10-09 16:00:09 +0200 |
commit | 8e6403b1bedd837485d86641aed2013abc4cc7f0 (patch) | |
tree | 5be9427f60b0e897a8be81ef446305a4d2c1a68c | |
parent | 9bd56d8aca25f84d018d423721161c9f438bfccd (diff) |
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.
-rw-r--r-- | global-functions | 2 |
1 files changed, 1 insertions, 1 deletions
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={ |