From 5fc1aa28a1ef6a59a4fc5dcce7b604a68008a7f1 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 2 Aug 2014 13:14:53 +1000 Subject: [PATCH] Add a throbber to the stratifier to show activity --- src/stratifier.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/stratifier.c b/src/stratifier.c index f5e889d0..e8a98cc7 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -413,9 +413,17 @@ static void purge_share_hashtable(int64_t wb_id) LOGINFO("Cleared %d shares from share hashtable", purged); } +static char *status_chars = "|/-\\"; + static void ckdbq_add(ckpool_t *ckp, const int idtype, json_t *val) { + static int counter = 0; ckdb_msg_t *msg; + char ch; + + ch = status_chars[(counter++) & 0x3]; + fprintf(stdout, "%c\r", ch); + fflush(stdout); if (ckp->standalone) return json_decref(val);