aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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