From 6acb482e7aae125c2bb128103b87a249e08b412a Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 3 Oct 2014 12:23:34 +1000 Subject: [PATCH] Bias workers as well as users --- src/stratifier.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index 8ad02163..e40935cc 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -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}",