Browse Source

Add timestamp to throbber.

master
Con Kolivas 8 years ago
parent
commit
499793c94c
  1. 7
      src/stratifier.c

7
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);
}
}

Loading…
Cancel
Save