Created the waitDelayOrButton() function that causes a delay that can be interrupted by a button press