mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-14 06:58:50 +02: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…
Add table
Add a link
Reference in a new issue