1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-05 21:07:52 +00:00

Merge branch 'master' of git.omp.am:/home/omp/git/conky

This commit is contained in:
Nikolas Garofil 2009-03-16 21:21:11 +01:00
commit 2d524ce450

View File

@ -319,6 +319,7 @@ void update_net_stats(void)
{
FILE *net_dev_fp;
static int rep = 0;
static char first = 1;
// FIXME: arbitrary size chosen to keep code simple.
int i, i2;
@ -442,9 +443,12 @@ void update_net_stats(void)
/*** end ip addr patch ***/
if (!first) {
/* calculate speeds */
ns->net_rec[0] = (ns->recv - last_recv) / delta;
ns->net_trans[0] = (ns->trans - last_trans) / delta;
}
curtmp1 = 0;
curtmp2 = 0;
// get an average
@ -525,6 +529,7 @@ void update_net_stats(void)
free(winfo);
#endif
}
first = 0;
fclose(net_dev_fp);