aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-02-24 11:36:36 +0100
committerGravatar Christian Hesse <mail@eworm.de>2020-02-24 12:55:18 +0100
commit5fab77abad6f4d4cc78118e57aff64b56abc85a4 (patch)
treea6310f0104dd61fc4da2439685e1fe0667acb06c
parent2a80fd6dbe64363123086cb9e7c16f84d9d71569 (diff)
global-functions: introduce $WaitTimeSync
-rw-r--r--global-functions10
1 files changed, 10 insertions, 0 deletions
diff --git a/global-functions b/global-functions
index 0e1530c..73a6d37 100644
--- a/global-functions
+++ b/global-functions
@@ -36,6 +36,7 @@
:global ScriptInstallUpdate;
:global MailServerIsUp;
:global TimeIsSync;
+:global WaitTimeSync;
# url encoding
:set UrlEncode do={
@@ -474,3 +475,12 @@
:return false;
}
+
+# wait for time to become synced
+:set WaitTimeSync do={
+ :global TimeIsSync;
+
+ :while ([ $TimeIsSync ] = false) do={
+ :delay 1s;
+ }
+}