summaryrefslogtreecommitdiffstats
path: root/usr.bin/systat/tcp.c
diff options
context:
space:
mode:
authormelifaro <melifaro@FreeBSD.org>2012-09-17 13:36:47 +0000
committermelifaro <melifaro@FreeBSD.org>2012-09-17 13:36:47 +0000
commit5d4e58ed8e46965b1c3efc1c7bb56298074b68dd (patch)
tree214963815700597764924eb2844d27ae9e182f57 /usr.bin/systat/tcp.c
parent6c6afc2093a4a82b3599c9c5860b5ab439a2d19d (diff)
downloadFreeBSD-src-5d4e58ed8e46965b1c3efc1c7bb56298074b68dd.zip
FreeBSD-src-5d4e58ed8e46965b1c3efc1c7bb56298074b68dd.tar.gz
Make systat(1) accept fractional number of seconds.
Make old alarm(3)-based code use select(2). MFC after: 2 weeks
Diffstat (limited to 'usr.bin/systat/tcp.c')
-rw-r--r--usr.bin/systat/tcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/systat/tcp.c b/usr.bin/systat/tcp.c
index 134aa9a..c9e8e9a 100644
--- a/usr.bin/systat/tcp.c
+++ b/usr.bin/systat/tcp.c
@@ -147,7 +147,7 @@ domode(struct tcpstat *ret)
switch(currentmode) {
case display_RATE:
sub = &oldstat;
- divisor = naptime;
+ divisor = (delay > 1000000) ? delay / 1000000 : 1;
break;
case display_DELTA:
sub = &oldstat;
OpenPOWER on IntegriCloud