cdtime_t last_update;
/* Interval in which the data is collected
* (for purding old entries) */
- int interval;
+ cdtime_t interval;
int state;
int hits;
ce->values_gauge[i] = NAN;
if (vl->interval > 0)
ce->values_gauge[i] = ((double) vl->values[i].absolute)
- / ((double) vl->interval);
+ / CDTIME_T_TO_DOUBLE (vl->interval);
ce->values_raw[i].absolute = vl->values[i].absolute;
break;
while (c_avl_iterator_next (iter, (void *) &key, (void *) &ce) == 0)
{
/* If entry has not been updated, add to `keys' array */
- if ((now - ce->last_update) >= (timeout_g * ce->interval))
+ if ((now - ce->last_update) >= (ce->interval * timeout_g))
{
char **tmp;