]> git.meshlink.io Git - catta/blobdiff - avahi-common/timeval.h
update NEWS once again
[catta] / avahi-common / timeval.h
index c046a19b852bdb44c9f9a1c6861335749d62af63..8bdb073dbdc071d3f7fdba5a5991b2aac8042e47 100644 (file)
@@ -22,6 +22,8 @@
   USA.
 ***/
 
+/** \file timeval.h Functions to facilitate timeval handling */
+
 #include <inttypes.h>
 #include <sys/time.h>
 
 
 AVAHI_C_DECL_BEGIN
 
+/** A numeric data type for storing microsecond values. (signed 64bit integer) */
 typedef int64_t AvahiUsec;
 
+/** Compare two timeval structures and return a ngeative value when a < b, 0 when a == b and a positive value otherwise */
 int avahi_timeval_compare(const struct timeval *a, const struct timeval *b);
+
+/** Calculate the difference between to timeval structures as microsecond value */
 AvahiUsec avahi_timeval_diff(const struct timeval *a, const struct timeval *b);
+
+/** Add a number of microseconds to the specified timeval structure and return it. *a is modified. */
 struct timeval* avahi_timeval_add(struct timeval *a, AvahiUsec usec);
 
+/** Return the difference between the current time and *a. Positive if *a was earlier */
 AvahiUsec avahi_age(const struct timeval *a);
-struct timeval *avahi_elapse_time(struct timeval *tv, unsigned msec, unsigned jitter);
+
+/** Fill *tv with the current time plus "ms" milliseconds plus an
+ * extra jitter of "j" milliseconds. Pass 0 for j if you don't want
+ * the jitter */
+struct timeval *avahi_elapse_time(struct timeval *tv, unsigned ms, unsigned j);
 
 AVAHI_C_DECL_END