---
title: workoutEvents
framework: healthkit
role: symbol
role_heading: Instance Property
path: healthkit/hkworkout/workoutevents
---

# workoutEvents

An array of workout event objects.

## Declaration

```swift
var workoutEvents: [HKWorkoutEvent]? { get }
```

## Discussion

Discussion This array specifies when the user has paused and resumed the workout activity. This method calculates the workout’s duration based on the amount of active time between the provided start and end dates. For more information on workout events, see HKWorkoutEvent.

## See Also

### Accessing workout data

- [duration](healthkit/hkworkout/duration.md)
- [workoutActivityType](healthkit/hkworkout/workoutactivitytype.md)
- [workoutActivities](healthkit/hkworkout/workoutactivities.md)
- [statistics(for:)](healthkit/hkworkout/statistics(for:).md)
- [allStatistics](healthkit/hkworkout/allstatistics.md)
- [totalDistance](healthkit/hkworkout/totaldistance.md)
- [totalEnergyBurned](healthkit/hkworkout/totalenergyburned.md)
- [totalFlightsClimbed](healthkit/hkworkout/totalflightsclimbed.md)
- [totalSwimmingStrokeCount](healthkit/hkworkout/totalswimmingstrokecount.md)
