Refactored EventLoop::timeout_ms to use Duration instead of u64.