Parcourir la source

fixed routine runner default delay bug.

sangwq il y a 1 an
Parent
commit
40f00c8ab1
1 fichiers modifiés avec 4 ajouts et 3 suppressions
  1. 4 3
      Venus/Framework/Common/Routine/RoutineRunner.cs

+ 4 - 3
Venus/Framework/Common/Routine/RoutineRunner.cs

@@ -29,7 +29,8 @@ namespace MECF.Framework.Common.Routine
 
         // 缺省最大超时 10 分钟, delay 5 秒
         private const int   _defaultTimeout = 600000;
-        private const int   _defaultDelay   = 100;
+        private const int   _defaultDelay = 200;
+        private const int _defaultDelay_5s = 5000;
 
         Stopwatch           _subStepTimer   = new Stopwatch();
 
@@ -160,7 +161,7 @@ namespace MECF.Framework.Common.Routine
             return this;
         }
 
-        public RoutineRunner Delay(int id, int delayMS = _defaultDelay)
+        public RoutineRunner Delay(int id, int delayMS = _defaultDelay_5s)
         {
             return Run(id, () => { return true; }, delayMS);
         }
@@ -264,7 +265,7 @@ namespace MECF.Framework.Common.Routine
             return this;
         }
 
-        public RoutineRunner LoopEnd(int id, Func<bool> action, Func<bool> condition, int timeout = _defaultTimeout)
+        public RoutineRunner LoopEnd(int id, Func<bool> action, Func<bool> condition, int timeout = _defaultDelay)
         {
             if (bAllowLoopSubStepStart(id))
             {