From 7731806417f5e23da175b3c94c375a36c8f2e97c Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 2 Feb 2014 10:47:17 +1100 Subject: [PATCH] Add stratum share submission lag time to verbose information if it's over 1 second. --- sgminer.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sgminer.c b/sgminer.c index ff0242de..60f21e47 100644 --- a/sgminer.c +++ b/sgminer.c @@ -260,6 +260,7 @@ struct stratum_share { struct work *work; int id; time_t sshare_time; + time_t sshare_sent; }; static struct stratum_share *stratum_shares = NULL; @@ -5471,6 +5472,15 @@ static void *stratum_sthread(void *userdata) free(sshare); pool->stale_shares++; total_stale++; + } else { + int ssdiff; + + sshare->sshare_sent = time(NULL); + ssdiff = sshare->sshare_sent - sshare->sshare_time; + if (ssdiff > 0) { + applog(LOG_INFO, "Pool %d stratum share submission lag time %d seconds", + pool->pool_no, ssdiff); + } } }