Bias workers as well as users

This commit is contained in:
Con Kolivas 2014-10-03 12:23:34 +10:00
parent 6ba4cf50a5
commit 6acb482e7a

View File

@ -2991,11 +2991,17 @@ static void *statsupdate(void *arg)
}
ghs = worker->dsps1 * nonces;
suffix_string(ghs, suffix1, 16, 0);
ghs = worker->dsps5 * nonces;
bias = time_bias(tdiff, 300);
ghs = worker->dsps5 * nonces / bias;
suffix_string(ghs, suffix5, 16, 0);
ghs = worker->dsps60 * nonces;
bias = time_bias(tdiff, 3600);
ghs = worker->dsps60 * nonces / bias;
suffix_string(ghs, suffix60, 16, 0);
ghs = worker->dsps1440 * nonces;
bias = time_bias(tdiff, 86400);
ghs = worker->dsps1440 * nonces / bias;
suffix_string(ghs, suffix1440, 16, 0);
JSON_CPACK(val, "{ss,ss,ss,ss}",