Contents

elapsedTime(at:)

Calculates the duration of the workout at the specified time.

Declaration

func elapsedTime(at date: Date) -> TimeInterval

Parameters

  • date:

    The end date to use to calculate the duration.

Discussion

The duration of a workout doesn’t include intervals between pause and resume events.

See Also

Starting the workout