aboutsummaryrefslogtreecommitdiffstats
path: root/global-functions.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-01-29 21:34:08 +0100
committerGravatar Christian Hesse <mail@eworm.de>2024-01-29 22:50:02 +0100
commite636d4194c44a916792da58944d89820035d9287 (patch)
tree49a5ea8616db245ed0b460c91f785ee5c99e1267 /global-functions.rsc
parent64abe7430aced959d0817f4922afd2d1d219b539 (diff)
global-functions: $RandomDelay: name the parameters
Diffstat (limited to 'global-functions.rsc')
-rw-r--r--global-functions.rsc5
1 files changed, 4 insertions, 1 deletions
diff --git a/global-functions.rsc b/global-functions.rsc
index 1109043..8411fc5 100644
--- a/global-functions.rsc
+++ b/global-functions.rsc
@@ -873,10 +873,13 @@
# delay a random amount of seconds
:set RandomDelay do={
+ :local Time [ :tonum $1 ];
+ :local Unit [ :tostr $2 ];
+
:global EitherOr;
:global GetRandomNumber;
- :delay ([ $GetRandomNumber $1 ] . [ $EitherOr $2 "s" ]);
+ :delay ([ $GetRandomNumber $Time ] . [ $EitherOr $Unit "s" ]);
}
# check for required RouterOS version