diff options
author | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-04-29 08:47:20 +0000 |
---|---|---|
committer | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-04-29 08:47:20 +0000 |
commit | c3effab24ea60e014e1223a884f595cc7bb1b9a4 (patch) | |
tree | b9b6ed5a6f6a016b72d27c108107ca9ef16a58db /tap-iostat.c | |
parent | bac4ceb944e3aa782f3c37a8a2ac0f8717b3d111 (diff) |
Fix display bug for interval. Interval was displayed as seconds and not in
ms units.
Fix conversion bug when converting from float to integer.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7598 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'tap-iostat.c')
-rw-r--r-- | tap-iostat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tap-iostat.c b/tap-iostat.c index add9f2a7a7..153f50fcb7 100644 --- a/tap-iostat.c +++ b/tap-iostat.c @@ -1,7 +1,7 @@ /* tap-iostat.c * iostat 2002 Ronnie Sahlberg * - * $Id: tap-iostat.c,v 1.7 2003/04/24 12:25:31 sahlberg Exp $ + * $Id: tap-iostat.c,v 1.8 2003/04/29 08:47:20 sahlberg Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -264,7 +264,7 @@ iostat_draw(io_stat_item_t *mit) printf("\n"); printf("===================================================================\n"); printf("IO Statistics\n"); - printf("Interval: %d secs\n", iot->interval); + printf("Interval: %d.%03d secs\n", iot->interval/1000, iot->interval%1000); for(i=0;i<iot->num_items;i++){ printf("Column #%d: %s\n",i,iot->filters[i]?iot->filters[i]:""); } @@ -594,7 +594,7 @@ iostat_init(char *optarg) /* make interval be number of ms */ - interval=interval_float*1000; + interval=(gint32)(interval_float*1000.0+0.9); if(interval<1){ fprintf(stderr, "tethereal:iostat_init() interval must be >=0.001 seconds\n"); exit(10); |