"In time" and "out of time" can be a musical reference, referring to a time signature. Especially in pop music, "time" refers to the beat of the song.
For example if a musician says,
You are playing that rhythm out of time.
It means you are not playing the correct rhythms, maybe playing in the wrong time signature or adding / dropping a beat, or playing too fast or too slow.
When you are surprised, startled or scared by something, we say your heart "skips a beat".
When a heart beats in time, it is beating with an even rhythm.
So to answer your question, my interpretation is that he's making a poetic phrase which includes sentiments of being startled, but safe with the support of a loved one.