3 ms·I'd have implement a state machine as an enum....by richardwhiuk 7y agoI'd have implement a state machine as an enum....