]> git.sesse.net Git - greproxy/blobdiff - timeutil.h
Moved time functions into a shared file.
[greproxy] / timeutil.h
diff --git a/timeutil.h b/timeutil.h
new file mode 100644 (file)
index 0000000..93d6973
--- /dev/null
@@ -0,0 +1,11 @@
+#ifndef _TIMEUTIL_H
+#define _TIMEUTIL_H 1
+
+#include <sys/time.h>
+
+double tdiff(const timeval& a, const timeval& b);
+bool less_than(const timeval &a, const timeval &b);
+timeval subtract_timeval_saturate(const timeval &a, const timeval &b);
+timeval offset_timeval_seconds(const timeval &a, double s);
+
+#endif  // !defined(_TIMEUTIL_H)