Use monotonic clock for timeouts
[project/mdnsd.git] / service.c
index db4694e..0b42aee 100644 (file)
--- a/service.c
+++ b/service.c
@@ -113,7 +113,7 @@ service_add_srv(struct service *s, int ttl)
 static int
 service_timeout(struct service *s)
 {
-       time_t t = time(NULL);
+       time_t t = monotonic_time();
 
        if (t - s->t <= TOUT_LOOKUP)
                return 0;