I hope you can apply that trick to other code? You change the cases.
You can do so much more with switch case. The cases do NOT have to be run in order nor end by setting the timer. Do ya like the one timer for all those cases?
When reading serial chars into a buffer as they arrive (many cycles apart), one case might run over and over until the buffer is full or a newline is read and -then- change to the next case that does the next thing.
When your code takes events and time into its design, it becomes real world code.
If it's good then it's good real world code, suitable for automation.