A system and method enables precise detection of the time of occurrence of a cardiac event of a heart. The method includes the steps of sensing electrical activity of the heart to generate an electrogram signal including the cardiac event, storing the electrogram signal, correlating the electrogram signal with an electrogram template, and identifying the time of occurrence of the cardiac event based upon the correlation.