summaryrefslogtreecommitdiffstats
path: root/util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-12-05 17:25:48 +0000
committerLennart Poettering <lennart@poettering.net>2004-12-05 17:25:48 +0000
commita3b571996ea5cb0227b36a20f3fc0986f7ab1b7d (patch)
tree4e20b8c423fb9ed8db4dd75fbe5af4101c70f479 /util.h
parentc1e61a10b499660ecf3bc33d09ad66eb407cb049 (diff)
move nss-mdns/* to trunk/
git-svn-id: file:///home/lennart/svn/public/nss-mdns/trunk@49 0ee8848e-81ea-0310-a63a-f631d1a40d77
Diffstat (limited to 'util.h')
-rw-r--r--util.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/util.h b/util.h
new file mode 100644
index 0000000..c550b4f
--- /dev/null
+++ b/util.h
@@ -0,0 +1,21 @@
+#ifndef fooutilhfoo
+#define fooutilhfoo
+
+#include <sys/time.h>
+#include <time.h>
+#include <inttypes.h>
+
+typedef uint64_t usec_t;
+
+usec_t timeval_diff(const struct timeval *a, const struct timeval *b);
+int timeval_cmp(const struct timeval *a, const struct timeval *b);
+usec_t timeval_age(const struct timeval *tv);
+void timeval_add(struct timeval *tv, usec_t v);
+
+int set_nonblock(int fd);
+int set_cloexec(int fd);
+
+int wait_for_write(int fd, struct timeval *end);
+int wait_for_read(int fd, struct timeval *end);
+
+#endif