public void AddRecognitionTime(double recognitionTime) { double previous = -1; if (RecognitionsTimesList.Count > 0) { previous = RecognitionsTimesList.Last(); } RecognitionsTimesList.Add(recognitionTime); if (previous > 0) { IntervalsList.Add(recognitionTime - previous); } UpdateIntervalsFields(); }