mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
global-functions: $RandomDelay: name the parameters
This commit is contained in:
parent
64abe7430a
commit
e636d4194c
1 changed files with 4 additions and 1 deletions
|
@ -873,10 +873,13 @@
|
||||||
|
|
||||||
# delay a random amount of seconds
|
# delay a random amount of seconds
|
||||||
:set RandomDelay do={
|
:set RandomDelay do={
|
||||||
|
:local Time [ :tonum $1 ];
|
||||||
|
:local Unit [ :tostr $2 ];
|
||||||
|
|
||||||
:global EitherOr;
|
:global EitherOr;
|
||||||
:global GetRandomNumber;
|
:global GetRandomNumber;
|
||||||
|
|
||||||
:delay ([ $GetRandomNumber $1 ] . [ $EitherOr $2 "s" ]);
|
:delay ([ $GetRandomNumber $Time ] . [ $EitherOr $Unit "s" ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
# check for required RouterOS version
|
# check for required RouterOS version
|
||||||
|
|
Loading…
Reference in a new issue