From 517ed7bf8cefe47e6c409915a4b27384f081715d Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 29 Apr 2024 17:55:48 +0200 Subject: global-functions: $WaitForFile: respect minimum delay --- global-functions.rsc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/global-functions.rsc b/global-functions.rsc index 1c36e2a..9c009ae 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -1517,10 +1517,11 @@ :global CleanFilePath; :global EitherOr; + :global MAX; :set FileName [ $CleanFilePath $FileName ]; :local I 1; - :local Delay ([ :totime [ $EitherOr $WaitTime 2s ] ] / 10); + :local Delay ([ :totime [ $MAX [ $EitherOr $WaitTime 2s ] 100ms ] ] / 10); :while ([ :len [ /file/find where name=$FileName ] ] = 0) do={ :if ($I >= 10) do={ -- cgit v1.2.3-70-g09d2