Timeout function and example added