mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-15 12:34:27 +02:00
global-functions: $RandomDelay: allow zero time, return immediately
This commit is contained in:
parent
e636d4194c
commit
16898ae997
1 changed files with 4 additions and 0 deletions
|
@ -879,6 +879,10 @@
|
||||||
:global EitherOr;
|
:global EitherOr;
|
||||||
:global GetRandomNumber;
|
:global GetRandomNumber;
|
||||||
|
|
||||||
|
:if ($Time = 0) do={
|
||||||
|
:return false;
|
||||||
|
}
|
||||||
|
|
||||||
:delay ([ $GetRandomNumber $Time ] . [ $EitherOr $Unit "s" ]);
|
:delay ([ $GetRandomNumber $Time ] . [ $EitherOr $Unit "s" ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue