g_assert(e);
e->state = AVAHI_CACHE_FINAL;
- g_get_current_time(&e->expiry);
+ gettimeofday(&e->expiry, NULL);
avahi_timeval_add(&e->expiry, 1000000); /* 1s */
update_time_event(c, e);
}
} else {
AvahiCacheEntry *e = NULL, *first;
- GTimeVal now;
+ struct timeval now;
- g_get_current_time(&now);
+ gettimeofday(&now, NULL);
/* This is an update request */
}
gboolean avahi_cache_entry_half_ttl(AvahiCache *c, AvahiCacheEntry *e) {
- GTimeVal now;
+ struct timeval now;
AvahiUsec age;
g_assert(c);
g_assert(e);
- g_get_current_time(&now);
+ gettimeofday(&now, NULL);
age = avahi_timeval_diff(&now, &e->timestamp)/1000000;