ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/event.c
(Generate patch)

Comparing libev/event.c (file contents):
Revision 1.42 by root, Mon May 10 20:01:45 2010 UTC vs.
Revision 1.43 by root, Fri Oct 15 22:44:42 2010 UTC

61 int dummy; 61 int dummy;
62}; 62};
63 63
64static struct event_base *ev_x_cur; 64static struct event_base *ev_x_cur;
65 65
66static void
67ev_tv_set (struct timeval *tv, ev_tstamp at)
68{
69 tv->tv_sec = (long)at;
70 tv->tv_usec = (long)((at - (ev_tstamp)tv->tv_sec) * 1e6);
71}
72
73static ev_tstamp 66static ev_tstamp
74ev_tv_get (struct timeval *tv) 67ev_tv_get (struct timeval *tv)
75{ 68{
76 if (tv) 69 if (tv)
77 { 70 {
303 if (ev->ev_events & EV_TIMEOUT || ev_is_active (&ev->to) || ev_is_pending (&ev->to)) 296 if (ev->ev_events & EV_TIMEOUT || ev_is_active (&ev->to) || ev_is_pending (&ev->to))
304 { 297 {
305 revents |= EV_TIMEOUT; 298 revents |= EV_TIMEOUT;
306 299
307 if (tv) 300 if (tv)
308 ev_tv_set (tv, ev_now (EV_A)); /* not sure if this is right :) */ 301 EV_TV_SET (tv, ev_now (EV_A)); /* not sure if this is right :) */
309 } 302 }
310 303
311 return events & revents; 304 return events & revents;
312} 305}
313 306

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines