The tv value must not be changed for a timeout that is still linked into the
tree of timeouts, otherwise the tree can get corrupted.
}
void timeout_add(event_loop_t *loop, timeout_t *timeout, timeout_cb_t cb, void *data, struct timeval *tv) {
}
void timeout_add(event_loop_t *loop, timeout_t *timeout, timeout_cb_t cb, void *data, struct timeval *tv) {
- if(!timeout->cb)
- timeout->tv = (struct timeval) {
- 0, 0
- };
-
timeout->node.data = timeout;
timeout_set(loop, timeout, tv);
timeout->node.data = timeout;
timeout_set(loop, timeout, tv);