From 499793c94c0548714b48577234dc35c094a41ea8 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Thu, 5 Jan 2017 09:36:19 +1100 Subject: [PATCH] Add timestamp to throbber. --- src/stratifier.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index 833bd2c4..c745ba9c 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -812,14 +812,15 @@ static void _ckdbq_add(ckpool_t *ckp, const int idtype, json_t *val, const char if (now_t != time_counter) { pool_stats_t *stats = &sdata->stats; - char hashrate[16], ch; + char stamp[128], hashrate[16], ch; /* Rate limit to 1 update per second */ time_counter = now_t; suffix_string(stats->dsps1 * nonces, hashrate, 16, 3); ch = status_chars[(counter++) & 0x3]; - fprintf(stdout, "\33[2K\r%c %sH/s %.1f SPS %d users %d workers", - ch, hashrate, stats->sps1, stats->users, stats->workers); + get_timestamp(stamp); + fprintf(stdout, "\33[2K\r%s %c %sH/s %.1f SPS %d users %d workers", + stamp, ch, hashrate, stats->sps1, stats->users, stats->workers); fflush(stdout); } }