Personally, I'de use the /play command and play the specified amount of lines. Using a while loop will probably be slower. Though it's up to you.