From fdc074f34b5284968cb4174e9c5d2bc253d70d4c Mon Sep 17 00:00:00 2001 From: root Date: Fri, 15 Oct 2010 22:44:41 +0000 Subject: clean up tv/ts handling --- event.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'event.c') diff --git a/event.c b/event.c index 4124769..af6267f 100644 --- a/event.c +++ b/event.c @@ -63,13 +63,6 @@ struct event_base static struct event_base *ev_x_cur; -static void -ev_tv_set (struct timeval *tv, ev_tstamp at) -{ - tv->tv_sec = (long)at; - tv->tv_usec = (long)((at - (ev_tstamp)tv->tv_sec) * 1e6); -} - static ev_tstamp ev_tv_get (struct timeval *tv) { @@ -305,7 +298,7 @@ int event_pending (struct event *ev, short events, struct timeval *tv) revents |= EV_TIMEOUT; if (tv) - ev_tv_set (tv, ev_now (EV_A)); /* not sure if this is right :) */ + EV_TV_SET (tv, ev_now (EV_A)); /* not sure if this is right :) */ } return events & revents; -- cgit v1.2.3