While there are numerous ways to calculate heart rate for monitoring a subject, if precise timing is required for advanced analysis (HRV, or Pulse Transit time), calculating heart rate from an ECG should be your first choice.