diff --git a/src/utils_cache.c b/src/utils_cache.c
index 05db70c888c220a897d52d417146e546a38b1cd0..10e8a48e20d2e1787f8c2c6cbc4b19b230154b5e 100644 (file)
--- a/src/utils_cache.c
+++ b/src/utils_cache.c
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 */
- /* FIXME: Remove macro once "ce->interval" is of type cdtime_t. */
- if ((now - ce->last_update) >= TIME_T_TO_CDTIME_T (timeout_g * ce->interval))
+ if ((now - ce->last_update) >= (ce->interval * timeout_g))
{
char **tmp;