-
-static void
-ocb (struct ev_timer *w, int revents)
-{
- //fprintf (stderr, "timer %f,%f (%x) (%f) d%p\n", w->at, w->repeat, revents, w->at - ev_time (), w->data);
- evtimer_stop (w);
- evtimer_start (w);
-}
-
-static void
-scb (struct ev_signal *w, int revents)
-{
- fprintf (stderr, "signal %x,%d\n", revents, w->signum);
- evio_stop (&wio);
- evio_start (&wio);
-}
-
-static void
-gcb (struct ev_signal *w, int revents)
-{
- fprintf (stderr, "generic %x\n", revents);
-
-}
-
-int main (void)
-{
- ev_init (0);
-
- evio_init (&wio, sin_cb, 0, EV_READ);
- evio_start (&wio);
-
- struct ev_timer t[10000];
-
-#if 0
- int i;
- for (i = 0; i < 10000; ++i)
- {
- struct ev_timer *w = t + i;
- evw_init (w, ocb, i);
- evtimer_init_abs (w, ocb, drand48 (), 0.99775533);
- evtimer_start (w);
- if (drand48 () < 0.5)
- evtimer_stop (w);
- }