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