aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/systat/icmp.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/icmp.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/icmp.c')
-rw-r--r--usr.bin/systat/icmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/systat/icmp.c b/usr.bin/systat/icmp.c
index e3a528047f7b..6085a9062236 100644
--- a/usr.bin/systat/icmp.c
+++ b/usr.bin/systat/icmp.c
@@ -138,7 +138,7 @@ domode(struct icmpstat *ret)
switch(currentmode) {
case display_RATE:
sub = &oldstat;
- divisor = naptime;
+ divisor = (delay > 1000000) ? delay / 1000000 : 1;
break;
case display_DELTA:
sub = &oldstat;