#include "hash.h"
#include "mem.h"
#include "log.h"
+#include "syscalls.h"
#include "cache.h"
/** @brief The global cache */
c = xmalloc(sizeof *c);
c->type = type;
c->value = value;
- time(&c->birth);
+ xtime(&c->birth);
hash_add(h, key, c, HASH_INSERT_OR_REPLACE);
}
if(h
&& (c = hash_find(h, key))
&& c->type == type
- && !expired(c, time(0)))
+ && !expired(c, xtime(0)))
return c->value;
else
return 0;
time_t now;
if(h) {
- time(&now);
+ xtime(&now);
hash_foreach(h, expiry_callback, &now);
}
}