Handle timeouts when it's necessary based on a Timeout interface. Signed-off-by: David Calavera <david.calavera@gmail.com>