From a3b571996ea5cb0227b36a20f3fc0986f7ab1b7d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 5 Dec 2004 17:25:48 +0000 Subject: move nss-mdns/* to trunk/ git-svn-id: file:///home/lennart/svn/public/nss-mdns/trunk@49 0ee8848e-81ea-0310-a63a-f631d1a40d77 --- util.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 util.h (limited to 'util.h') 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 +#include +#include + +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 -- cgit