#include "Channel.h" #include "EventLoop.h" #include #include muduo::EventLoop* g_loop; void timeout() { printf("Timeout!\n"); g_loop->quit(); } int main() { muduo::EventLoop loop; g_loop = &loop; loop.runAfter(5, timeout); loop.loop(); }