7 eventxx::dispatcher& d;
9 handler(eventxx::dispatcher& d): d(d), i(0) {}
10 void operator() (int signum, eventxx::type event)
12 std::cout << ++i << " interrupts, ";
13 if (i < 5) std::cout << "keep going...\n";
16 std::cout << "done!\n";
22 void timer_handler(int, short, void*)
24 std::cout << "Press Ctrl-C 5 times to quit.\n";
29 eventxx::dispatcher d;
31 eventxx::ctimer t(timer_handler);
32 eventxx::signal< handler > e(SIGINT, h);
33 d.add(t, eventxx::time(1)); // 1 second