Event loop and watcher based on libev.