From 3d1b57a21ebe4b8f05cda0943ecb33ce438ffbc6 Mon Sep 17 00:00:00 2001 From: dr|z3d Date: Mon, 13 Sep 2021 14:33:43 +0000 Subject: [PATCH] Console: display bandwidth to 2 decimal places if < 10K/s --- daemon/HTTPServer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daemon/HTTPServer.cpp b/daemon/HTTPServer.cpp index 7503d91e..188408a0 100644 --- a/daemon/HTTPServer.cpp +++ b/daemon/HTTPServer.cpp @@ -701,7 +701,7 @@ namespace http { s << "" << tr("Bandwidth") << ""; s << std::fixed << std::setprecision(0); if (i2p::transport::transports.GetInBandwidth () > 1024*1024*1024 || - i2p::transport::transports.GetInBandwidth () < 1024 && + i2p::transport::transports.GetInBandwidth () < 10240 && i2p::transport::transports.GetInBandwidth () > 0) s << std::fixed << std::setprecision(2); else if (i2p::transport::transports.GetInBandwidth () > 1024*1024) @@ -710,7 +710,7 @@ namespace http { s << " / "; s << std::fixed << std::setprecision(0); if (i2p::transport::transports.GetOutBandwidth () > 1024*1024*1024 || - i2p::transport::transports.GetOutBandwidth () < 1024 && + i2p::transport::transports.GetOutBandwidth () < 10240 && i2p::transport::transports.GetOutBandwidth () > 0) s << std::fixed << std::setprecision(2); else if (i2p::transport::transports.GetOutBandwidth () > 1024*1024) @@ -722,7 +722,7 @@ namespace http { (i2p::transport::transports.GetTotalReceivedBytes () > 0)) { s << std::fixed << std::setprecision(0); if (i2p::transport::transports.GetTransitBandwidth () > 1024*1024*1024 || - i2p::transport::transports.GetTransitBandwidth () < 1024 && + i2p::transport::transports.GetTransitBandwidth () < 10240 && i2p::transport::transports.GetTransitBandwidth () > 0) s << std::fixed << std::setprecision(2); else if (i2p::transport::transports.GetTransitBandwidth () > 1024*1024)