Vitezslav Samel <vitezslav(a)samel.cz> writes:
We need to update traffic rates of all interfaces, because rates
of not visible interfaces would not be updated and therefore bad rates
would be shown after scrolling the screen and making them visible.
Split updaterates() function: the new updaterates() updates rates only
(but for all interfaces), the new showrates() prints the visible rates
on the display. In the main loop call both functions now.
This new updaterates() function must be called every 1s to have accurate
bps units. The showrates() function can called any time and will show
the correct running average.
Signed-off-by: Vitezslav Samel <vitezslav(a)samel.cz>
---
src/ifstats.c | 23 ++++++++++++++++++-----
1 files changed, 18 insertions(+), 5 deletions(-)
thanks, pushed.
--
Nikola