---
title: TotalBackgroundLocationTimeMetric
framework: metrickit
role: symbol
role_heading: Structure
path: metrickit/totalbackgroundlocationtimemetric
---

# TotalBackgroundLocationTimeMetric

A metric that measures the total time the app spent in the background using location services.

## Declaration

```swift
struct TotalBackgroundLocationTimeMetric
```

## Discussion

Discussion This metric corresponds to the MetricResult.totalBackgroundLocationTime(_:) case. It appears in both intervalEntries and stateEntries when state reporting is enabled. This type replaces the cumulativeBackgroundLocationTime property of MXAppRunTimeMetric.

## Topics

### Measurements

- [value](metrickit/totalbackgroundlocationtimemetric/value.md)

## Relationships

### Conforms To

- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Time-in-use metrics

- [TotalForegroundTimeMetric](metrickit/totalforegroundtimemetric.md)
- [TotalBackgroundTimeMetric](metrickit/totalbackgroundtimemetric.md)
- [TotalBackgroundAudioTimeMetric](metrickit/totalbackgroundaudiotimemetric.md)
- [LocationActivityTimeMetric](metrickit/locationactivitytimemetric.md)
- [CellularConditionTimeMetric](metrickit/cellularconditiontimemetric.md)
