Merge pull request #205 from scottmckenzie/dev

Right align hashrate report to six characters
This commit is contained in:
fireice-uk
2017-12-06 02:13:39 +00:00
committed by GitHub
+4 -7
View File
@@ -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');