diff --git a/Refresher.Core/Pipelines/Steps/DelayOneSecondStep.cs b/Refresher.Core/Pipelines/Steps/DelayOneSecondStep.cs index e461782..f7c69f7 100644 --- a/Refresher.Core/Pipelines/Steps/DelayOneSecondStep.cs +++ b/Refresher.Core/Pipelines/Steps/DelayOneSecondStep.cs @@ -1,3 +1,5 @@ +using System.Diagnostics; + namespace Refresher.Core.Pipelines.Steps; public class DelayOneSecondStep : Step @@ -10,6 +12,11 @@ public DelayOneSecondStep(Pipeline pipeline) : base(pipeline) public override async Task ExecuteAsync(CancellationToken cancellationToken = default) { - await Task.Delay(1000, cancellationToken); + Stopwatch stopwatch = Stopwatch.StartNew(); + while (stopwatch.ElapsedMilliseconds <= 1000) + { + this.Progress = stopwatch.ElapsedMilliseconds / 1000.0f; + await Task.Delay(10, cancellationToken); + } } } \ No newline at end of file