After your heart stops it can take as little as 10 to 20 seconds to become unconscious so it's very important to get medical attention right away or call 911 if you think you or someone is about to have a heart attack.
You can then die within 5 to 10 minutes after going unconscious or even sooner so CPR needs to be performed and emergency services need to be summoned right away before starting CPR.