From: hno <> Date: Sun, 6 Jul 2003 18:03:40 +0000 (+0000) Subject: Bugfix: Make sure the clock is updated after poll/select to account for X-Git-Tag: SQUID_3_0_PRE1~73 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=40a77eeff82b9fea5b736f21878912353916e966;p=thirdparty%2Fsquid.git Bugfix: Make sure the clock is updated after poll/select to account for the time sleeping waiting for I/O. --- diff --git a/src/comm_poll.cc b/src/comm_poll.cc index fd44743083..96b97c2565 100644 --- a/src/comm_poll.cc +++ b/src/comm_poll.cc @@ -1,6 +1,6 @@ /* - * $Id: comm_poll.cc,v 1.11 2003/03/04 01:40:27 robertc Exp $ + * $Id: comm_poll.cc,v 1.12 2003/07/06 12:03:40 hno Exp $ * * DEBUG: section 5 Socket Functions * @@ -463,6 +463,8 @@ comm_select(int msec) /* NOTREACHED */ } + getCurrentTime(); + debug(5, num ? 5 : 8) ("comm_poll: %d+%ld FDs ready\n", num, npending); statHistCount(&statCounter.select_fds_hist, num); /* Check timeout handlers ONCE each second. */ diff --git a/src/comm_select.cc b/src/comm_select.cc index 90a25a064a..08824ab66d 100644 --- a/src/comm_select.cc +++ b/src/comm_select.cc @@ -1,6 +1,6 @@ /* - * $Id: comm_select.cc,v 1.69 2003/03/04 01:40:27 robertc Exp $ + * $Id: comm_select.cc,v 1.70 2003/07/06 12:03:40 hno Exp $ * * DEBUG: section 5 Socket Functions * @@ -496,8 +496,10 @@ comm_select(int msec) if (num < 0 && !pending) continue; - debug(5, num ? 5 : 8) ("comm_select: %d+%d FDs ready at %d\n", - num, pending, (int) squid_curtime); + getCurrentTime(); + + debug(5, num ? 5 : 8) ("comm_select: %d+%d FDs ready\n", + num, pending); statHistCount(&statCounter.select_fds_hist, num);