diff options
Diffstat (limited to 'src/cache_iterators.c')
-rw-r--r-- | src/cache_iterators.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cache_iterators.c b/src/cache_iterators.c index 4bf518a..3a1ec72 100644 --- a/src/cache_iterators.c +++ b/src/cache_iterators.c @@ -26,6 +26,7 @@ #include <sched.h> #include <errno.h> #include <string.h> +#include <time.h> struct __dump_container { int fd; @@ -75,6 +76,11 @@ static int do_dump(void *data1, struct hashtable_node *n) data += obj->cache->features[i]->size; } } + if (container->type != NFCT_O_XML) { + long tm = time(NULL); + size += sprintf(buf+size, " [active since %lds]", + tm - obj->lifetime); + } size += sprintf(buf+size, "\n"); if (send(container->fd, buf, size, 0) == -1) { if (errno != EPIPE) |