Refactoring for Timeout::timeout