aboutsummaryrefslogtreecommitdiffstats
path: root/include/rin/time.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/rin/time.h')
-rw-r--r--include/rin/time.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/rin/time.h b/include/rin/time.h
index 523103f..9c8200f 100644
--- a/include/rin/time.h
+++ b/include/rin/time.h
@@ -21,17 +21,27 @@
#ifndef LIBRIN_TIME_INCLUDED
#define LIBRIN_TIME_INCLUDED
-#include <time.h>
+#include <sys/time.h>
struct timespec rin_time_add(const struct timespec * const a, const struct timespec * const b);
struct timespec rin_time_sub(const struct timespec * const a, const struct timespec * const b);
struct timespec rin_time_normalize(const struct timespec * const t);
+struct timeval rin_timeval_add(const struct timeval * const a, const struct timeval * const b);
+struct timeval rin_timeval_sub(const struct timeval * const a, const struct timeval * const b);
+struct timeval rin_timeval_normalize(const struct timeval * const t);
long int rin_time_cmp(const struct timespec * const a, const struct timespec * const b);
+long int rin_timeval_cmp(const struct timeval * const a, const struct timeval * const b);
unsigned int rin_time_cmp_less(const struct timespec * const a, const struct timespec * const b);
unsigned int rin_time_cmp_more(const struct timespec * const a, const struct timespec * const b);
unsigned int rin_time_cmp_lessequal(const struct timespec * const a, const struct timespec * const b);
unsigned int rin_time_cmp_moreequal(const struct timespec * const a, const struct timespec * const b);
unsigned int rin_time_cmp_equal(const struct timespec * const a, const struct timespec * const b);
unsigned int rin_time_cmp_nonequal(const struct timespec * const a, const struct timespec * const b);
+unsigned int rin_timeval_cmp_less(const struct timeval * const a, const struct timeval * const b);
+unsigned int rin_timeval_cmp_more(const struct timeval * const a, const struct timeval * const b);
+unsigned int rin_timeval_cmp_lessequal(const struct timeval * const a, const struct timeval * const b);
+unsigned int rin_timeval_cmp_moreequal(const struct timeval * const a, const struct timeval * const b);
+unsigned int rin_timeval_cmp_equal(const struct timeval * const a, const struct timeval * const b);
+unsigned int rin_timeval_cmp_nonequal(const struct timeval * const a, const struct timeval * const b);
#endif /* LIBRIN_TIME_INCLUDED */