diff options
author | Christian Hesse <mail@eworm.de> | 2024-01-29 21:34:08 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-01-29 22:50:02 +0100 |
commit | e636d4194c44a916792da58944d89820035d9287 (patch) | |
tree | 49a5ea8616db245ed0b460c91f785ee5c99e1267 | |
parent | 64abe7430aced959d0817f4922afd2d1d219b539 (diff) |
global-functions: $RandomDelay: name the parameters
-rw-r--r-- | global-functions.rsc | 5 |
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 |