Of course, this is never going to happen to you, because you are always so well prepared for every event that you never fall. But just so you know what to do so you can tell your friends, here is the info.
Gymnasts have 30 seconds to remount the bars and resume their routine. What does this mean? That 30 second time starts when a gymnast touches the floor. The a gymnast has 30 seconds until they touch the bars to remount to resume the routine. 30 seconds from fall on floor to touching the bars to start routine again.
During that time, the timer is supposed to give verbal warning when 10 seconds is remaining. The gymnast is free to chalk up, fix their grips and talk to the coach during this time. Gymnasts cannot leave the competition area during this time
The coach can assist and lift the gymnast to the high bar and help them restart their swing, if necessary. Gymnasts may take up to two swings to get enough swing to start back into their routine. Any more swings than that and they can be deducted .3 for extra swings.
Thirty seconds is longer than you think and enough time to chalk and talk with your coach about where to restart the routine and what to do. Gymnast should take the time allowed and make sure they are ready to remount the bars and restart their routine. There is no real advantage to jumping right back up on the bars without making sure you are really ready.
The fall is past history and you should forget it even happened and concentrate on the doing your best on the rest of the routine. Thinking back to what made you fall means you are not concentrating on doing the rest of your routine.