From b097aa3288f6c964d86df1f765e6d07cce0ab0f7 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Sun, 24 Nov 2002 08:45:54 +0000 Subject: per-second cell statistics to help with profiling svn:r140 --- src/or/main.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/or/main.c') diff --git a/src/or/main.c b/src/or/main.c index 6d8961d25..ef35529d4 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -376,6 +376,7 @@ int prepare_for_poll(int *timeout) { for(i=0;i current_second) { /* the second has already rolled over! */ // log(LOG_DEBUG,"prepare_for_poll(): The second has rolled over, immediately refilling."); for(i=0;ionions_handled_this_second = 0; } current_second = now.tv_sec; /* remember which second it is, for next time */ - } else { - /* this timeout is definitely sooner than any of the above ones */ - *timeout = 1000 - (now.tv_usec / 1000); /* how many milliseconds til the next second? */ } - } +// } else { + /* this timeout is definitely sooner than any of the above ones */ + *timeout = 1000 - (now.tv_usec / 1000); /* how many milliseconds til the next second? */ +// } +// } if(options.LinkPadding) { /* now check which conn wants to speak soonest */ @@ -530,7 +533,7 @@ int do_main_loop(void) { static void catch(int the_signal) { switch(the_signal) { - case SIGABRT: +// case SIGABRT: case SIGTERM: case SIGINT: log(LOG_NOTICE,"Catching signal %d, exiting cleanly.", the_signal); @@ -644,7 +647,7 @@ int main(int argc, char *argv[]) { int retval = 0; signal (SIGINT, catch); /* catch kills so we can exit cleanly */ - signal (SIGABRT, catch); +// signal (SIGABRT, catch); signal (SIGTERM, catch); signal (SIGUSR1, catch); /* to dump stats to stdout */ signal (SIGHUP, catch); /* to reload directory */ -- cgit v1.2.3