From c071258c24c6bdb2576c8056849aabca0b09a230 Mon Sep 17 00:00:00 2001 From: guinux Date: Sat, 15 Apr 2017 21:10:04 +0200 Subject: [PATCH] fix #146 --- src/transaction.vala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/transaction.vala b/src/transaction.vala index bb43093..d46ef45 100644 --- a/src/transaction.vala +++ b/src/transaction.vala @@ -1351,7 +1351,7 @@ namespace Pamac { text.append (previous_textbar); timer.start (); } else { - if (timer.elapsed () > 0) { + if (timer.elapsed () > 0.1) { download_rate = ((download_rate * rates_nb) + (uint64) ((xfered - previous_xfered) / timer.elapsed ())) / (rates_nb + 1); rates_nb++; } @@ -1400,7 +1400,7 @@ namespace Pamac { fraction = 1; previous_filename = ""; } else { - if (timer.elapsed () > 0) { + if (timer.elapsed () > 0.1) { download_rate = ((download_rate * rates_nb) + (uint64) ((xfered - previous_xfered) / timer.elapsed ())) / (rates_nb + 1); rates_nb++; }