Sets timeout duration.