From 2a1538e74effeefa06c0c6496720af4bfed5dd20 Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Fri, 23 Jun 2006 04:41:17 +0000 Subject: [PATCH] Patch from Tobias Glenstrup for sane values when timer is greater than 1 second. SVN revision: 23547 --- e_mod_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/e_mod_main.c b/e_mod_main.c index 9438f3b..8fc9be2 100644 --- a/e_mod_main.c +++ b/e_mod_main.c @@ -472,6 +472,9 @@ _net_cb_check(void *data) bytes_in = in - inst->old_in; bytes_out = out - inst->old_out; + bytes_in = bytes_in / ci->poll_time; + bytes_out = bytes_out / ci->poll_time; + if (bytes_in < 0) bytes_in = 0; if (bytes_out < 0) bytes_out = 0;