Patch from Tobias Glenstrup for sane values when timer is greater than 1

second.


SVN revision: 23547
This commit is contained in:
Christopher Michael 2006-06-23 04:41:17 +00:00
parent e63ca45526
commit 2a1538e74e
1 changed files with 3 additions and 0 deletions

View File

@ -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;