diff options
author | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-09-17 21:38:19 +0800 |
---|---|---|
committer | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-09-17 21:38:19 +0800 |
commit | 8f26219156d6ac6f0eaf26f5f3fadf81e16c9f18 (patch) | |
tree | 22955c70d449361bf326d316544680c62b5fa404 /util | |
parent | 3fb391995ebc4b4a0238660d3594bc0f8db3c17e (diff) | |
download | pttbbs-8f26219156d6ac6f0eaf26f5f3fadf81e16c9f18.tar pttbbs-8f26219156d6ac6f0eaf26f5f3fadf81e16c9f18.tar.gz pttbbs-8f26219156d6ac6f0eaf26f5f3fadf81e16c9f18.tar.bz2 pttbbs-8f26219156d6ac6f0eaf26f5f3fadf81e16c9f18.tar.lz pttbbs-8f26219156d6ac6f0eaf26f5f3fadf81e16c9f18.tar.xz pttbbs-8f26219156d6ac6f0eaf26f5f3fadf81e16c9f18.tar.zst pttbbs-8f26219156d6ac6f0eaf26f5f3fadf81e16c9f18.zip |
move counter
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3424 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r-- | util/broadcast.c | 14 |
1 files 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; } |