Allow adjusting timeout and performing actions when a timeout occurs.