Yes that one only works the first iteration. I haven't compiled this code to test (to the Arduino C++ variant have do...while... loops?).
long quitTime;
void loop () {
quitTime = millis () + 10000;
do {
// Do stuff
} while (millis () < quitTime);
quitTime = millis () + 2000;
do {
// Do other stuff
} while (millis() < quitTime);
}
Remember that it won't interrupt the execution and jump out of a loop, so to make it work you can't have too much code (execution time wise "much") in there.
Say that in the second step you have code which takes 1.5 second to run. Then it will exit the loop 3 seconds after it started.
But if you have code that only takes 10 ms to run, well you may overshoot with a few ms but that is probably okay.