mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-10 10:04:28 +02:00
global-functions: $RandomDelay: allow to specify unit in second argument
This commit is contained in:
parent
39b7bddf49
commit
855399b2bc
1 changed files with 2 additions and 1 deletions
|
@ -658,9 +658,10 @@
|
|||
|
||||
# delay a random amount of seconds
|
||||
:set RandomDelay do={
|
||||
:global EitherOr;
|
||||
:global GetRandomNumber;
|
||||
|
||||
:delay ([ $GetRandomNumber $1 ] . "s");
|
||||
:delay ([ $GetRandomNumber $1 ] . [ $EitherOr $2 "s" ]);
|
||||
}
|
||||
|
||||
# check for required RouterOS version
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue