When the heart starts beating incorrectly, the person is starting to feel bad, and there are only about 10 seconds before fainting. But, to prevent this happening, you can do one thing.
If you feel that you are about to have a heart attack, you can start coughing, energetically and without stopping. Take a deep breath every time before coughing and every cough should be long and deep, like you are coughing up mucus.
Repeat breathing and coughing every two seconds, until the help arrives, or until you feel your heart is working properly again.
This technique is effective because deep breaths are introducing oxygen into the lungs, while coughing is making pressure onto the heart, keeping good circulation. Pressure will help in returning normal heart rhythm. In this way, people who are having a heart attack can get safe to the hospital.