summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott McKenzie <scott@noizyland.net>2017-11-22 22:16:40 +1100
committerScott McKenzie <scott@noizyland.net>2017-11-22 22:16:40 +1100
commit9a51c6bf2e393faab590600784412627531ea74c (patch)
tree38ba5b8ef44e8d96d61cbefa641978c1167337fc
parent0c67b32c5d7933d46f7fad1624fa87ab6523caa0 (diff)
downloadxmr-stak-9a51c6bf2e393faab590600784412627531ea74c.zip
xmr-stak-9a51c6bf2e393faab590600784412627531ea74c.tar.gz
Right align hashrate report to six characters
-rw-r--r--xmrstak/misc/executor.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/xmrstak/misc/executor.cpp b/xmrstak/misc/executor.cpp
index ca78c61..4d8c084 100644
--- a/xmrstak/misc/executor.cpp
+++ b/xmrstak/misc/executor.cpp
@@ -625,14 +625,11 @@ inline const char* hps_format(double h, char* buf, size_t l)
{
if(std::isnormal(h) || h == 0.0)
{
- if(h < 10.0)
- snprintf(buf, l, " %03.1f", h);
- else
- snprintf(buf, l, " %04.1f", h);
+ snprintf(buf, l, " %6.1f", h);
return buf;
}
else
- return " (na)";
+ return " (na)";
}
bool executor::motd_filter_console(std::string& motd)
@@ -726,9 +723,9 @@ void executor::hashrate_report(std::string& out)
std::transform(name.begin(), name.end(), name.begin(), ::toupper);
out.append("HASHRATE REPORT - ").append(name).append("\n");
- out.append("| ID | 10s | 60s | 15m |");
+ out.append("| ID | 10s | 60s | 15m |");
if(nthd != 1)
- out.append(" ID | 10s | 60s | 15m |\n");
+ out.append(" ID | 10s | 60s | 15m |\n");
else
out.append(1, '\n');
OpenPOWER on IntegriCloud