summaryrefslogtreecommitdiffstats
path: root/xmrstak/misc
diff options
context:
space:
mode:
authorfireice-uk <fireice-uk@users.noreply.github.com>2017-12-06 02:13:39 +0000
committerGitHub <noreply@github.com>2017-12-06 02:13:39 +0000
commit47a4d031bcc3159a298afaae6797cd19240ad0a1 (patch)
tree83e3e5a14818ebe830fbf4d26353a0874eea2620 /xmrstak/misc
parent53e4b7531e9031e388cdda46052fab423d82f888 (diff)
parent9a51c6bf2e393faab590600784412627531ea74c (diff)
downloadxmr-stak-47a4d031bcc3159a298afaae6797cd19240ad0a1.zip
xmr-stak-47a4d031bcc3159a298afaae6797cd19240ad0a1.tar.gz
Merge pull request #205 from scottmckenzie/dev
Right align hashrate report to six characters
Diffstat (limited to 'xmrstak/misc')
-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 f7e6311..c500b21 100644
--- a/xmrstak/misc/executor.cpp
+++ b/xmrstak/misc/executor.cpp
@@ -631,14 +631,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)
@@ -732,9 +729,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