Add timeout pattern

This pattern does a state check and increase the checking time when
checking each time.