summaryrefslogtreecommitdiffstats
path: root/include/timer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/timer.h')
-rw-r--r--include/timer.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/timer.h b/include/timer.h
new file mode 100644
index 0000000..e3b7b74
--- /dev/null
+++ b/include/timer.h
@@ -0,0 +1,19 @@
+#ifndef _NFT_SYNC_TIMER_H
+#define _NFT_SYNC_TIMER_H_
+
+#include <event.h>
+
+struct nft_timer {
+ struct event event;
+ void (*callback)(struct nft_timer *);
+ void *data;
+};
+
+void *nft_timer_data(struct nft_timer *timer);
+void nft_timer_setup(struct nft_timer *timer, void (*cb)(struct nft_timer *),
+ void *data);
+void nft_timer_add(struct nft_timer *timer, unsigned int sec,
+ unsigned int usec);
+void nft_timer_del(struct nft_timer *timer);
+
+#endif