aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2021-06-24 16:48:49 +0200
committerGravatar Christian Hesse <mail@eworm.de>2021-06-24 22:28:08 +0200
commit855399b2bc888e592a2a440425fd07430b18f24b (patch)
treef91c7b6f038fed8b554b20a477b980cc04eca77c
parent39b7bddf497b26a56c20b2dd5722776be11a35ec (diff)
global-functions: $RandomDelay: allow to specify unit in second argument
-rw-r--r--global-functions3
1 files changed, 2 insertions, 1 deletions
diff --git a/global-functions b/global-functions
index 677cfc7..da718f3 100644
--- a/global-functions
+++ b/global-functions
@@ -658,9 +658,10 @@
# delay a random amount of seconds
:set RandomDelay do={
+ :global EitherOr;
:global GetRandomNumber;
- :delay ([ $GetRandomNumber $1 ] . "s");
+ :delay ([ $GetRandomNumber $1 ] . [ $EitherOr $2 "s" ]);
}
# check for required RouterOS version