For state-machines, loop allowing return of: * next action * exit loop * error * sleep cmd (or time)
For state-machines, loop allowing return of: