summaryrefslogtreecommitdiff
path: root/lib/tevent/tevent_timed.c
AgeCommit message (Collapse)AuthorFilesLines
2013-03-01tevent: optimize adding new zero timer eventsStefan Metzmacher1-27/+94
Such events were used before we had immediate events. It's likely that there're a lot of this events and we need to add new ones in fifo order. The tricky part is that tevent_common_add_timer() should not use the optimization as it's used by broken Samba versions, which don't use tevent_common_loop_timer_delay() in source3/lib/events.c. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01tevent: optimize adding new timer eventsStefan Metzmacher1-8/+24
As new timestamps typically get higher:-) it's better to traverse the existing list from the tail. This is not completely optimal, but it should be better than before. A second optimization could be done for zero timestamps, we would just remember the last_zero_timer, but that would change the internal ABI. Normally thatshould not be a poblem, but the Samba's source3/lib/events.c abuses tevent_internal.h from the current source tree, even if an external tevent.h is used. The other problem is that it makes use of tevent_common_add_timer() without using tevent_common_loop_timer_delay(). Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01tevent: add a debug message in tevent_common_loop_timer_delay()Stefan Metzmacher1-0/+4
We should debug a message before and after running the handler. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2011-02-09tevent: Fix typosVolker Lendecke1-2/+2
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Feb 9 18:13:18 CET 2011 on sn-devel-104
2009-09-25Fixing timeval calculationSimo Sorce1-1/+1
The code was always doubling microseconds when attempting to round up.
2009-02-17tevent: Rename ev_timeval* functions to tevent_timeval, export them.Kai Blin1-17/+38
Also add tevent_timeval_add() and tevent_timeval_current_ofs() to help not depending on lub/util/time.c for things that just need tevent
2009-02-16lib/tevent: change to LGPLv3+Stefan Metzmacher1-13/+17
metze
2009-02-13lib/tevent: expose ev_timeval_zero() for internal usageStefan Metzmacher1-1/+1
metze
2009-01-05tevent: add some debugging for timer events, that mostly matches samba3Stefan Metzmacher1-0/+12
metze
2009-01-05tevent: don't crash if te->event_ctx is NULLStefan Metzmacher1-3/+3
metze
2009-01-02tevent: pass down handler_name and location to the backend layerStefan Metzmacher1-9/+13
metze
2009-01-02tevent: use libreplace headers instead of system headersStefan Metzmacher1-4/+1
metze
2008-12-29s4:lib/tevent: rename structsStefan Metzmacher1-9/+9
list="" list="$list event_context:tevent_context" list="$list fd_event:tevent_fd" list="$list timed_event:tevent_timer" for s in $list; do o=`echo $s | cut -d ':' -f1` n=`echo $s | cut -d ':' -f2` r=`git grep "struct $o" |cut -d ':' -f1 |sort -u` files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4` for f in $files; do cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp mv $f.tmp $f done done metze
2008-12-29lib/tevent: rename event_* => tevent_* in the header fileStefan Metzmacher1-5/+5
We have compat macros to keep the callers happy. metze
2008-12-17s4:lib/tevent: add lib/events/ compat and let things compileStefan Metzmacher1-3/+3
metze
2008-12-17s4:lib/events: move to toplevel directory as lib/tevent/Stefan Metzmacher1-0/+230
This commit will not compile on its own. metze