diff --git a/UIShare/GlobalVariable/StepRunning.cs b/UIShare/GlobalVariable/StepRunning.cs index 9dbe7bf..8db4933 100644 --- a/UIShare/GlobalVariable/StepRunning.cs +++ b/UIShare/GlobalVariable/StepRunning.cs @@ -473,7 +473,11 @@ namespace UIShare { if(_scopedContext.Program.StepCollection.Count>1) _scopedContext.SelectedStep = null; + // 区间延迟不计入步骤运行时间:延迟期间暂停步骤计时器(子程序内的区间延迟同样排除,它们都归属顶层步骤的计时区间) + bool timingPaused = stepStopwatch.IsRunning; + if (timingPaused) stepStopwatch.Stop(); await Task.Delay(_systemConfig.PerformanceLevel, cancellationToken); + if (timingPaused) stepStopwatch.Start(); // 1. 查找类型