From 432ed2a70cab967a1dd0c91727e9faf0da83027c Mon Sep 17 00:00:00 2001 From: hsc Date: Mon, 14 Sep 2026 17:21:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=AD=A5=E9=AA=A4=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=8E=92=E9=99=A4=E5=8C=BA=E9=97=B4=E5=BB=B6?= =?UTF-8?q?=E8=BF=9F=EF=BC=88=E5=BB=B6=E8=BF=9F=E6=9C=9F=E9=97=B4=E6=9A=82?= =?UTF-8?q?=E5=81=9CstepStopwatch=EF=BC=8CDelay=E5=91=BD=E4=BB=A4=E5=8F=AA?= =?UTF-8?q?=E8=AE=B0=E5=AE=9E=E9=99=85=E5=91=BD=E4=BB=A4=E8=80=97=E6=97=B6?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- UIShare/GlobalVariable/StepRunning.cs | 4 ++++ 1 file changed, 4 insertions(+) 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. 查找类型