From 8d4fd94fc8332b23f757443841a5c19c104a9bb8 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 5 Dec 2004 17:33:51 +0000 Subject: move source files to src/ git-svn-id: file:///home/lennart/svn/public/nss-mdns/trunk@51 0ee8848e-81ea-0310-a63a-f631d1a40d77 --- src/util.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/util.h (limited to 'src/util.h') diff --git a/src/util.h b/src/util.h new file mode 100644 index 0000000..c550b4f --- /dev/null +++ b/src/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