diff --git a/DRAMSys/simulator/src/common/Utils.h b/DRAMSys/simulator/src/common/Utils.h index 9d97e8dc..78dc85ed 100644 --- a/DRAMSys/simulator/src/common/Utils.h +++ b/DRAMSys/simulator/src/common/Utils.h @@ -94,7 +94,10 @@ bool isIn(const T& value, const std::vector& collection) constexpr const char headline[] = "========================================================="; -static inline void loadbar(unsigned int x, unsigned int n, unsigned int w = 50, unsigned int granularity = 1) +static inline void loadbar(unsigned int x, + unsigned int n, + unsigned int w = 50, + unsigned int granularity = 1) { if ((n < 100) || ((x != n) && (x % (n / 100 * granularity) != 0))) return; @@ -106,7 +109,7 @@ static inline void loadbar(unsigned int x, unsigned int n, unsigned int w = 50, for (unsigned int x = 0; x < c; x++) std::cout << "█"; - if(rest > 0 && rest < 0.125) + if(rest >= 0 && rest < 0.125 && c != w) std::cout << " "; if(rest >= 0.125 && rest < 2*0.125) std::cout << "▏";