aboutsummaryrefslogtreecommitdiff
path: root/timecalc.h
diff options
context:
space:
mode:
authorLucas Castro <lucas@gnuabordo.com.br>2024-01-10 22:33:44 -0300
committerLucas Castro <lucas@gnuabordo.com.br>2024-01-10 22:33:44 -0300
commita4270020addc324fb60d2b1b446b41bc31e3baf8 (patch)
tree8708f08c66a63f08c0cd88ab1a46faadcd3f4706 /timecalc.h
Import Upstream version 1.0.4upstream/1.0.4
Diffstat (limited to 'timecalc.h')
-rw-r--r--timecalc.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/timecalc.h b/timecalc.h
new file mode 100644
index 0000000..d3c80ad
--- /dev/null
+++ b/timecalc.h
@@ -0,0 +1,22 @@
+/*
+
+ (C) 2011 Mika Ilmaranta <ilmis@nullnet.fi>
+
+*/
+
+#ifndef __TIMECALC_H__
+#define __TIMECALC_H__
+
+#include <time.h>
+#include <sys/time.h>
+
+#define TIMEVAL_DIFF_CMP_GT (0)
+#define TIMEVAL_DIFF_CMP_LT (1)
+
+int timeval_diff_cmp(struct timeval *a, struct timeval *b, int operation, time_t sec, suseconds_t usec);
+long timeval_diff(struct timeval *a, struct timeval *b);
+void timeval_add(struct timeval *a, time_t sec, suseconds_t usec);
+
+#endif
+
+/* EOF */