I don't think that code will compile. The } on line 39 terminates the loop() function.
Have a look at the demo Several Things at a Time. Note how each function runs very briefly and returns to loop() so the next one can be called. Long running processes are achieved a tiny piece at a time. And there may be dozens of calls to some functions before it is actually time for anything to happen.
...R