]> granicus.if.org Git - libevent/commitdiff
uhm - i obliterated a gettimeofday that was required for remapping the
authorNiels Provos <provos@gmail.com>
Tue, 28 Mar 2006 16:57:19 +0000 (16:57 +0000)
committerNiels Provos <provos@gmail.com>
Tue, 28 Mar 2006 16:57:19 +0000 (16:57 +0000)
timeouts to "real" time.  thanks to claudio for pointing that out.

svn:r211

event.c

diff --git a/event.c b/event.c
index 8cab2659f3efe78aaaf5edc9729c6747bfa9b63a..8621f6c27d29684aaa98601bb426681dd5278467 100644 (file)
--- a/event.c
+++ b/event.c
@@ -561,7 +561,8 @@ event_pending(struct event *ev, short event, struct timeval *tv)
        if (tv != NULL && (flags & event & EV_TIMEOUT)) {
                gettime(&now);
                timersub(&ev->ev_timeout, &now, &res);
-               gettime(&now);
+               /* correctly remap to real time */
+               gettimeofday(&now, NULL);
                timeradd(&now, &res, tv);
        }