From 06966bed79187136ddcf6b10b59f50d3ba948700 Mon Sep 17 00:00:00 2001 From: markster Date: Mon, 23 Feb 2004 20:22:57 +0000 Subject: Prevent integer overflow on timeout git-svn-id: http://svn.digium.com/svn/zaptel/trunk@316 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- ztmonitor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ztmonitor.c') 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