aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2019-07-26 18:14:33 +0200
committerGravatar Christian Hesse <mail@eworm.de>2019-07-26 18:14:33 +0200
commitacce2322c347deb75c38337a725ead30320a9f6e (patch)
treed82e47acb0f7e31a85d6e9e9e6937417f21f35ec
parentf49b67f5e7f938b881acbb2fbce8be5b3261bfea (diff)
global-functions: add $RandomDelay
-rw-r--r--global-functions7
1 files changed, 7 insertions, 0 deletions
diff --git a/global-functions b/global-functions
index 6f1776b..b7eec27 100644
--- a/global-functions
+++ b/global-functions
@@ -258,3 +258,10 @@
}
:return ($Sum % $Max);
}
+
+# delay a random amount of seconds
+:global RandomDelay do={
+ :global GetRandom;
+
+ :delay ([ $GetRandom $1 ] . "s");
+}