fix: 步骤运行时间排除区间延迟(延迟期间暂停stepStopwatch,Delay命令只记实际命令耗时)

This commit is contained in:
2026-09-14 17:21:39 +08:00
parent 186eec4e75
commit 432ed2a70c
+4
View File
@@ -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. 查找类型