global-functions: $WaitForFile: use fewer steps

This commit is contained in:
Christian Hesse 2024-04-29 17:57:22 +02:00
parent 6ba1faca4c
commit 52ec6b7ea1

View file

@ -1520,10 +1520,10 @@
:set FileName [ $CleanFilePath $FileName ];
:local I 1;
:local Delay ([ :totime [ $EitherOr $WaitTime 2s ] ] / 20);
:local Delay ([ :totime [ $EitherOr $WaitTime 2s ] ] / 10);
:while ([ :len [ /file/find where name=$FileName ] ] = 0) do={
:if ($I >= 20) do={
:if ($I >= 10) do={
:return false;
}
:delay $Delay;