r15220@catbus: nickm | 2007-09-20 14:22:57 -0400

Another patch from Trond: Skip calling gettime() in timeout_process if we have no events in the timetree.


svn:r445
This commit is contained in:
Nick Mathewson 2007-09-20 18:27:01 +00:00
parent 5a0d671f0e
commit f4c84e8628
2 changed files with 5 additions and 1 deletions

View File

@ -20,4 +20,5 @@ Changes in current version:
o Add an evutil module (with header evutil.h) to implement our standard cross-platform hacks, on the theory that somebody else would like to use them too.
o Fix signals implementation on windows.
o Fix http module on windows to close sockets properly.
o Make autogen.sh script run correctly on systems where /bin/sh isn't bash. (Patch from Trond Norbye, rewritten by Hagne Mahre and then Hannah Schroeter.)
o Make autogen.sh script run correctly on systems where /bin/sh isn't bash. (Patch from Trond Norbye, rewritten by Hagne Mahre and then Hannah Schroeter.)
o Skip calling gettime() in timeout_process if we are not in fact waiting for any events. (Patch from Trond Norbye)

View File

@ -807,6 +807,9 @@ timeout_process(struct event_base *base)
struct timeval now;
struct event *ev, *next;
if (RB_EMPTY(&base->timetree))
return;
gettime(&now);
for (ev = RB_MIN(event_tree, &base->timetree); ev; ev = next) {