Hi kevinyuan136,
Once you enter the Computer Lab (one of the Test Center Moderators will escort you in AND out of the room every time), you're meant to start whatever section is 'next' for you on the Test. While you can certainly ask to leave the Test WHILE the clock is running, you should plan your other tasks around the two 8-minute breaks that you receive. As such, you should probably use the restroom BEFORE you officially sign-in at the front counter. You might be able to use the restroom right before you enter the Computer Lab for the first time though (but you should ask the staff when you arrive if that would be possible or not).
GMAT assassins aren't born, they're made,
Rich