From 379cfed69aaa955b744f87aee1cd81f9bf0f6f28 Mon Sep 17 00:00:00 2001 From: marc barbier Date: Sat, 10 Jul 2021 17:49:12 +0200 Subject: [PATCH] bandwidth precision improvement --- ModsListDownloader/src/downloader/helper/HttpHelper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ModsListDownloader/src/downloader/helper/HttpHelper.java b/ModsListDownloader/src/downloader/helper/HttpHelper.java index 1d313df..977ae7e 100644 --- a/ModsListDownloader/src/downloader/helper/HttpHelper.java +++ b/ModsListDownloader/src/downloader/helper/HttpHelper.java @@ -13,6 +13,7 @@ import java.nio.file.Paths; import java.util.Locale; import downloader.Log; +import downloader.Main; public class HttpHelper { private HttpHelper() {} @@ -126,7 +127,7 @@ public class HttpHelper { if(elapsed != 0) { long estimatedBandwith = (long) (bytesRead / elapsed); //display the estimate - Log.setStaticPrint(formatBandwidth(estimatedBandwith)); + Log.setStaticPrint("estimated bandwidth :" + formatBandwidth(estimatedBandwith * Main.threadNb)); start = System.currentTimeMillis(); } downloadingWriter.write(buffer, 0, bytesRead);