---
title: totalActivityDuration
framework: deviceactivity
role: symbol
role_heading: Instance Property
path: deviceactivity/deviceactivitydata/activitysegment/totalactivityduration
---

# totalActivityDuration

Access the total activity time during the activity segment.

## Declaration

```swift
var totalActivityDuration: TimeInterval
```

## Discussion

Discussion This value represents the total amount of time the device’s screen remained on during dateInterval.

## See Also

### Measuring activity

- [longestActivity](deviceactivity/deviceactivitydata/activitysegment/longestactivity.md)
