aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-04-29 17:55:48 +0200
committerGravatar Christian Hesse <mail@eworm.de>2024-04-29 23:02:48 +0200
commit517ed7bf8cefe47e6c409915a4b27384f081715d (patch)
tree60bd4fe559ea628759b870dc9cdc52e28a92c65e
parent52ec6b7ea19256e47d9ffd1519ef9d7799ca48ba (diff)
global-functions: $WaitForFile: respect minimum delay
-rw-r--r--global-functions.rsc3
1 files changed, 2 insertions, 1 deletions
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={