Program for pauses in autonomous using bumper switch?

I am looking to create a program that will stop mid autonomous and wait for a bumper switch to be pressed, and continue with the next section of code. This would be useful so that I can reposition the robot by hand during the pause, and not have to worry about a specific wait time. If any one knows how to help, it would be greatly appreciated! Thank you!


// Code before waiting for bumper switch
while(!SensorBoolean[myButtonPort])
    wait1MSec(30); // Don't hog CPU

// Code after bumper switch is pressed

Alternatively (same code, simpler syntax)


// Code before waiting for bumper switch

while(SensorBoolean[myButtonPort] == false) // Button is not pressed
{
    wait1Msec(30); // Don't hog CPU
}
// Code after bumper switch is pressed