mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-25 12:10:03 +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$
|
||||
|
||||
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
|
||||
* 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 (r < ns->last_read_recv)
|
||||
ns->recv +=
|
||||
((long long) 4294967295U -
|
||||
ns->last_read_recv) + r;
|
||||
last_recv = 0;
|
||||
else
|
||||
ns->recv += (r - ns->last_read_recv);
|
||||
ns->last_read_recv = r;
|
||||
|
||||
if (t < ns->last_read_trans)
|
||||
ns->trans +=
|
||||
((long long) 4294967295U -
|
||||
ns->last_read_trans) + t;
|
||||
last_trans = 0;
|
||||
else
|
||||
ns->trans += (t - ns->last_read_trans);
|
||||
ns->last_read_trans = t;
|
||||
|
Loading…
Reference in New Issue
Block a user