tcp.c (231011) | tcp.c (240605) |
---|---|
1/*- 2 * Copyright (c) 1980, 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 23 unchanged lines hidden (view full) --- 32/* From: */ 33static char sccsid[] = "@(#)mbufs.c 8.1 (Berkeley) 6/6/93"; 34static const char rcsid[] = 35 "Id: mbufs.c,v 1.5 1997/02/24 20:59:03 wollman Exp"; 36#endif /* not lint */ 37#endif 38 39#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1980, 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 23 unchanged lines hidden (view full) --- 32/* From: */ 33static char sccsid[] = "@(#)mbufs.c 8.1 (Berkeley) 6/6/93"; 34static const char rcsid[] = 35 "Id: mbufs.c,v 1.5 1997/02/24 20:59:03 wollman Exp"; 36#endif /* not lint */ 37#endif 38 39#include <sys/cdefs.h> |
40__FBSDID("$FreeBSD: head/usr.bin/systat/tcp.c 231011 2012-02-05 09:17:49Z ed $"); | 40__FBSDID("$FreeBSD: head/usr.bin/systat/tcp.c 240605 2012-09-17 13:36:47Z melifaro $"); |
41 42#include <sys/param.h> 43#include <sys/types.h> 44#include <sys/socket.h> 45#include <sys/sysctl.h> 46 47#include <netinet/in.h> 48#include <netinet/in_systm.h> --- 93 unchanged lines hidden (view full) --- 142domode(struct tcpstat *ret) 143{ 144 const struct tcpstat *sub; 145 int divisor = 1; 146 147 switch(currentmode) { 148 case display_RATE: 149 sub = &oldstat; | 41 42#include <sys/param.h> 43#include <sys/types.h> 44#include <sys/socket.h> 45#include <sys/sysctl.h> 46 47#include <netinet/in.h> 48#include <netinet/in_systm.h> --- 93 unchanged lines hidden (view full) --- 142domode(struct tcpstat *ret) 143{ 144 const struct tcpstat *sub; 145 int divisor = 1; 146 147 switch(currentmode) { 148 case display_RATE: 149 sub = &oldstat; |
150 divisor = naptime; | 150 divisor = (delay > 1000000) ? delay / 1000000 : 1; |
151 break; 152 case display_DELTA: 153 sub = &oldstat; 154 break; 155 case display_SINCE: 156 sub = &initstat; 157 break; 158 default: --- 168 unchanged lines hidden --- | 151 break; 152 case display_DELTA: 153 sub = &oldstat; 154 break; 155 case display_SINCE: 156 sub = &initstat; 157 break; 158 default: --- 168 unchanged lines hidden --- |