summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xztmonitor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ztmonitor.c b/ztmonitor.c
index 642ce2a..a579146 100755
--- a/ztmonitor.c
+++ b/ztmonitor.c
@@ -194,12 +194,12 @@ void visualize(short *tx, short *rx, int cnt)
static int samerxmax = 0;
static int txbest = 0;
static int rxbest = 0;
- int ms;
+ float ms;
static struct timeval last;
struct timeval tv;
gettimeofday(&tv, NULL);
- ms = (tv.tv_sec - last.tv_sec) * 1000 + (tv.tv_usec - last.tv_usec) / 1000;
+ ms = (tv.tv_sec - last.tv_sec) * 1000.0 + (tv.tv_usec - last.tv_usec) / 1000.0;
for (x=0;x<cnt;x++) {
txavg += abs(tx[x]);
rxavg += abs(rx[x]);