Adds a configurable timeout