mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-26 12:27:52 +00:00
Fix displaying 4 GB traffic after reloading network driver, patch #1754260. thanks sohalt.
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@886 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
parent
c559001bab
commit
55811b7f53
@ -1,7 +1,9 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
2007-07-15
|
2007-07-15
|
||||||
* Fix PID display, patch #1753934. thanks to sohalt.
|
* Fix PID display, patch #1753934. thanks sohalt.
|
||||||
|
* Fix displaying 4 GB traffic after reloading network driver,
|
||||||
|
patch #1754260. thanks sohalt.
|
||||||
|
|
||||||
2007-06-21
|
2007-06-21
|
||||||
* Right-justify top/top_mem vars (pid/cpu/mem} so they align on the decimal.
|
* Right-justify top/top_mem vars (pid/cpu/mem} so they align on the decimal.
|
||||||
|
@ -185,17 +185,13 @@ inline void update_net_stats()
|
|||||||
/* if recv or trans is less than last time, an overflow happened */
|
/* if recv or trans is less than last time, an overflow happened */
|
||||||
|
|
||||||
if (r < ns->last_read_recv)
|
if (r < ns->last_read_recv)
|
||||||
ns->recv +=
|
last_recv = 0;
|
||||||
((long long) 4294967295U -
|
|
||||||
ns->last_read_recv) + r;
|
|
||||||
else
|
else
|
||||||
ns->recv += (r - ns->last_read_recv);
|
ns->recv += (r - ns->last_read_recv);
|
||||||
ns->last_read_recv = r;
|
ns->last_read_recv = r;
|
||||||
|
|
||||||
if (t < ns->last_read_trans)
|
if (t < ns->last_read_trans)
|
||||||
ns->trans +=
|
last_trans = 0;
|
||||||
((long long) 4294967295U -
|
|
||||||
ns->last_read_trans) + t;
|
|
||||||
else
|
else
|
||||||
ns->trans += (t - ns->last_read_trans);
|
ns->trans += (t - ns->last_read_trans);
|
||||||
ns->last_read_trans = t;
|
ns->last_read_trans = t;
|
||||||
|
Loading…
Reference in New Issue
Block a user