From cac53b244e7cc2202f17e01149c5a39643da58b5 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 22 Mar 2011 15:54:02 +0100 Subject: indexamajig: Refine output --- src/indexamajig.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/indexamajig.c b/src/indexamajig.c index 6094c552..42a91e53 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -38,7 +38,7 @@ #include "reflist-utils.h" - +/* Write statistics at APPROXIMATELY this interval */ #define STATS_EVERY_N_SECONDS (5) @@ -396,14 +396,13 @@ static void finalise_image(void *qp, void *pp) qargs->n_processed++; clock_gettime(CLOCK_REALTIME, &tp); - if ( tp.tv_sec > qargs->t_last_stats+STATS_EVERY_N_SECONDS ) { + if ( tp.tv_sec >= qargs->t_last_stats+STATS_EVERY_N_SECONDS ) { STATUS("%i out of %i indexed so far," - " %i out of %i in the last %i seconds.\n", + " %i out of %i since the last message.\n", qargs->n_indexable, qargs->n_processed, qargs->n_indexable - qargs->n_indexable_last_stats, - qargs->n_processed - qargs->n_processed_last_stats, - STATS_EVERY_N_SECONDS); + qargs->n_processed - qargs->n_processed_last_stats); qargs->n_processed_last_stats = qargs->n_processed; qargs->n_indexable_last_stats = qargs->n_indexable; -- cgit v1.2.3