aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/systat/ip.c
diff options
context:
space:
mode:
authorAlexander V. Chernikov <melifaro@FreeBSD.org>2012-09-17 13:36:47 +0000
committerAlexander V. Chernikov <melifaro@FreeBSD.org>2012-09-17 13:36:47 +0000
commit8b3daf895a629984a7c3ef5449c280288fd9dccb (patch)
tree214963815700597764924eb2844d27ae9e182f57 /usr.bin/systat/ip.c
parent058ede33bfe4496a47fd00e162fea03cf04bcfe3 (diff)
Make systat(1) accept fractional number of seconds.
Make old alarm(3)-based code use select(2). MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=240605
Diffstat (limited to 'usr.bin/systat/ip.c')
-rw-r--r--usr.bin/systat/ip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/systat/ip.c b/usr.bin/systat/ip.c
index cad79b7f7ab8..8e12a6a0b0b8 100644
--- a/usr.bin/systat/ip.c
+++ b/usr.bin/systat/ip.c
@@ -146,7 +146,7 @@ domode(struct stat *ret)
switch(currentmode) {
case display_RATE:
sub = &oldstat;
- divisor = naptime;
+ divisor = (delay > 1000000) ? delay / 1000000 : 1;
break;
case display_DELTA:
sub = &oldstat;