fixed calculation of default history values when -u is not 1
Costa Tsaousis (ktsaou) committed
Oct 13, 2013 at 23:10 UTC
a6f74baef561588e58ff1382879aaed703229c45
1 file changed
+1
-1
netdata.c
+1
-1
@@ -58,7 +58,7 @@ void update_iface_history(unsigned long long usec, char *name, unsigned long lon
58
interfaces = iface;
59
60
for(i = 0; i < HISTORY ;i++) {
61
- iface->history[i].time = time(NULL) - HISTORY + (i * update_every);
61
+ iface->history[i].time = time(NULL) - (HISTORY * update_every) + (i * update_every);
62
iface->history[i].rbytes = rbytes;
63
iface->history[i].tbytes = tbytes;
64
iface->history[i].usec = usec;