Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update hashrate display calculations #18

Open
wants to merge 6 commits into
base: ARM
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ccminer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ Options:\n\
x17 X17\n\
wildkeccak Boolberry\n\
zr5 ZR5 (ZiftrCoin)\n\
--nicehash Enable extranonce subscribe with this options.\n\
-d, --devices Comma separated list of CUDA devices to use.\n\
Device IDs start counting from 0! Alternatively takes\n\
string names of your cards like gtx780ti or gt640#2\n\
Expand Down
8 changes: 4 additions & 4 deletions util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,18 +217,18 @@ void format_hashrate_unit(double hashrate, char *output, const char *unit)
{
char prefix[2] = { 0, 0 };

if (hashrate < 10000) {
if (hashrate < 1e3) {
// nop
}
else if (hashrate < 1e7) {
else if (hashrate < 1e6) {
prefix[0] = 'k';
hashrate *= 1e-3;
}
else if (hashrate < 1e10) {
else if (hashrate < 1e9) {
prefix[0] = 'M';
hashrate *= 1e-6;
}
else if (hashrate < 1e13) {
else if (hashrate < 1e12) {
prefix[0] = 'G';
hashrate *= 1e-9;
}
Expand Down