summary refs log tree commit diff
path: root/evloop/timeheap.h
diff options
context:
space:
mode:
authorRichard Nyberg <rnyberg@murmeldjur.se>2009-01-09 18:26:23 +0100
committerRichard Nyberg <rnyberg@murmeldjur.se>2009-01-11 15:26:46 +0100
commit59905999ce145a81e0003766d468945c2444a90e (patch)
treeb4b2f566942c2a4b90ab7a6d6111c73c49e4afc5 /evloop/timeheap.h
parent4457c1268a923d2a662ab23ca1b8d7920811ae51 (diff)
downloadbtpd-59905999ce145a81e0003766d468945c2444a90e.tar.gz
btpd-59905999ce145a81e0003766d468945c2444a90e.zip
Add evloop, btpd's new event loop. This will replace libevent.
Diffstat (limited to 'evloop/timeheap.h')
-rw-r--r--evloop/timeheap.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/evloop/timeheap.h b/evloop/timeheap.h
new file mode 100644
index 0000000..8a712c5
--- /dev/null
+++ b/evloop/timeheap.h
@@ -0,0 +1,19 @@
+#ifndef BTPD_TIMEHEAP_H
+#define BTPD_TIMEHEAP_H
+
+struct th_handle {
+    int i;
+    void *data;
+};
+
+int timeheap_init(void);
+int timeheap_size(void);
+
+int  timeheap_insert(struct th_handle *h, struct timespec *t);
+void timeheap_remove(struct th_handle *h);
+void timeheap_change(struct th_handle *h, struct timespec *t);
+
+void *timeheap_remove_top(void);
+struct timespec timeheap_top(void);
+
+#endif