mirror of
https://github.com/nymurbd/MikroTik-scripts.git
synced 2025-07-10 18:14:29 +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
|
# delay a random amount of seconds
|
||||||
:set RandomDelay do={
|
:set RandomDelay do={
|
||||||
|
:global EitherOr;
|
||||||
:global GetRandomNumber;
|
:global GetRandomNumber;
|
||||||
|
|
||||||
:delay ([ $GetRandomNumber $1 ] . "s");
|
:delay ([ $GetRandomNumber $1 ] . [ $EitherOr $2 "s" ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
# check for required RouterOS version
|
# check for required RouterOS version
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue