5 * Walk through the database list and return the first database which
6 * last update is too far in past
8 struct rrd_database *get_outdated_db(struct rrd_database **dblist)
13 for (i = 0; dblist[i]; i++) {
14 if ((dblist[i]->last_update + dblist[i]->interval) - now <= 0)
18 /* Nothing to update this time, return null */
23 * See how long we may sleep until it is required to run an update
27 int get_next_update(struct rrd_database **dblist)
29 int i, sleeptime = 0, diff;
32 for (i = 0; dblist[i]; i++) {
33 diff = dblist[i]->last_update + dblist[i]->interval - now;