summaryrefslogtreecommitdiff
path: root/sys/kern/uipc_socket2.c
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1998-04-04 13:26:20 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1998-04-04 13:26:20 +0000
commit00af9731c9222d8b48655e01fadef7161f8b64dc (patch)
treed04ac6a7ae5e50842f6b6bbc5306cbce7b849c72 /sys/kern/uipc_socket2.c
parent883674371ecbe1ce8376f70836be251397ae5327 (diff)
Notes
Diffstat (limited to 'sys/kern/uipc_socket2.c')
-rw-r--r--sys/kern/uipc_socket2.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c
index 997442dc1d5f..47df800c71eb 100644
--- a/sys/kern/uipc_socket2.c
+++ b/sys/kern/uipc_socket2.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)uipc_socket2.c 8.1 (Berkeley) 6/10/93
- * $Id: uipc_socket2.c,v 1.30 1997/09/07 16:53:48 bde Exp $
+ * $Id: uipc_socket2.c,v 1.31 1998/03/01 19:39:19 guido Exp $
*/
#include <sys/param.h>
@@ -157,13 +157,14 @@ sodropablereq(head)
{
register struct socket *so;
unsigned int i, j, qlen;
-
static int rnd;
- static long old_mono_secs;
+ static struct timeval old_runtime;
static unsigned int cur_cnt, old_cnt;
+ struct timeval tv;
- if ((i = (mono_time.tv_sec - old_mono_secs)) != 0) {
- old_mono_secs = mono_time.tv_sec;
+ getmicroruntime(&tv);
+ if ((i = (tv.tv_sec - old_runtime.tv_sec)) != 0) {
+ old_runtime = tv;
old_cnt = cur_cnt / i;
cur_cnt = 0;
}