Calculate time difference between subsequent entries