From 9c59fe2c31b81c283d8dd99438aec36f946ed0be Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 2 Feb 2014 10:51:21 +1100 Subject: [PATCH] Add stratum share response lag time to verbose output if it's greater than 1 second. --- sgminer.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sgminer.c b/sgminer.c index 60f21e47..37f3307a 100644 --- a/sgminer.c +++ b/sgminer.c @@ -5026,8 +5026,15 @@ static void stratum_share_result(json_t *val, json_t *res_val, json_t *err_val, struct stratum_share *sshare) { struct work *work = sshare->work; + time_t now_t = time(NULL); char hashshow[64]; + int srdiff; + srdiff = now_t - sshare->sshare_sent; + if (srdiff > 0) { + applog(LOG_INFO, "Pool %d stratum share result lag time %d seconds", + work->pool->pool_no, srdiff); + } show_hash(work, hashshow); share_result(val, res_val, err_val, work, hashshow, false, ""); }