From 8f26219156d6ac6f0eaf26f5f3fadf81e16c9f18 Mon Sep 17 00:00:00 2001 From: wens Date: Sun, 17 Sep 2006 13:38:19 +0000 Subject: move counter git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3424 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- util/broadcast.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/util/broadcast.c b/util/broadcast.c index 79e02799..92b2df9f 100644 --- a/util/broadcast.c +++ b/util/broadcast.c @@ -59,13 +59,6 @@ int main(int argc, char *argv[]) now = time(NULL); for (i = 0, j = 0; i < UTMPnumber; ++i, ++j) { - if (j == num_per_loop) { - fprintf(stderr, "%5d/%5d\n", i + 1, UTMPnumber); - j = 0; - now = time(NULL); - sleep(sleep_time); - } - // XXX why use sorted list? // can we just scan uinfo with proper checking? uentp = &SHM->uinfo[sorted[i]]; @@ -81,6 +74,13 @@ int main(int argc, char *argv[]) #endif } } + + if (j == num_per_loop) { + fprintf(stderr, "%5d/%5d\n", i + 1, UTMPnumber); + j = 0; + now = time(NULL); + sleep(sleep_time); + } } return 0; } -- cgit v1.2.3