I'm using libevent2, I need restart a evtimer before it expired, I do this by removed the old timer and refresh the timeval and add it back to event base.
When I use gdb to debug my application, I found every time I 'refresh' the timer, a thread was exited, and a new thread was created. I'll create more than 100 timer, and refresh them every 5 seconds, so I hope libevent can provider a new api and without recreate thread for it. such as:
evtimer_refresh (struct event *ev, struct timeval *tv);