The most important thing you can do for your health: quit smoking! Tobacco is a stimulant substance, and it can precipitate abnormal rhythms of the heart (mostly coming from the upper chambers) which is probably what you have experienced. If the episodes are frequent, an ambulatory Holter monitor
could be diagnostic of the situation. You should consult a provider to see if this could be arranged for you.
Dr Brenes-Salazar MD
Mayo Clinic MN