From b51c3189bb80d5db42ff3531eeb5089297f6a239 Mon Sep 17 00:00:00 2001 From: laolarou Date: Thu, 23 Jan 2025 23:40:39 -0800 Subject: [PATCH] Update DownloadHelper.cs --- ProjBobcat/ProjBobcat/Class/Helper/DownloadHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProjBobcat/ProjBobcat/Class/Helper/DownloadHelper.cs b/ProjBobcat/ProjBobcat/Class/Helper/DownloadHelper.cs index 9eb71fd..a7e42ad 100644 --- a/ProjBobcat/ProjBobcat/Class/Helper/DownloadHelper.cs +++ b/ProjBobcat/ProjBobcat/Class/Helper/DownloadHelper.cs @@ -132,7 +132,7 @@ public static async Task DownloadData(AbstractDownloadBase downloadFile, Downloa await destStream.WriteAsync(buffer.Memory[..bytesRead], cts.Token); var duration = Stopwatch.GetElapsedTime(startTime); - var elapsedTime = duration.TotalSeconds == 0 ? 1 : duration.TotalSeconds; + var elapsedTime = duration.TotalSeconds < 0.0001 ? 1 : duration.TotalSeconds; averageSpeed = responseLength / elapsedTime;