diff options
| author | Richard Nyberg <rnyberg@murmeldjur.se> | 2009-01-09 18:26:23 +0100 |
|---|---|---|
| committer | Richard Nyberg <rnyberg@murmeldjur.se> | 2009-01-11 15:26:46 +0100 |
| commit | 59905999ce145a81e0003766d468945c2444a90e (patch) | |
| tree | b4b2f566942c2a4b90ab7a6d6111c73c49e4afc5 /evloop/timeheap.h | |
| parent | 4457c1268a923d2a662ab23ca1b8d7920811ae51 (diff) | |
| download | btpd-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.h | 19 |
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 |