Using multiple millis in function

This sounds like a good candidate for a state machine using a switch-case statement