---
title: HangTimeMetric
framework: metrickit
role: symbol
role_heading: Structure
path: metrickit/hangtimemetric
---

# HangTimeMetric

A metric that measures app hang time.

## Declaration

```swift
struct HangTimeMetric
```

## Discussion

Discussion This metric corresponds to the MetricResult.hangTime(_:) case. It appears in both intervalEntries and stateEntries when state reporting is enabled. Hang durations that exceed 9 seconds of wall clock time are reported in the histogram’s final bucket. This type replaces the histogrammedApplicationHangTime property of MXAppResponsivenessMetric.

## Topics

### Measurements

- [histogram](metrickit/hangtimemetric/histogram.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

### Launch and responsiveness metrics

- [TimeToFirstDrawMetric](metrickit/timetofirstdrawmetric.md)
- [OptimizedTimeToFirstDrawMetric](metrickit/optimizedtimetofirstdrawmetric.md)
- [ApplicationResumeTimeMetric](metrickit/applicationresumetimemetric.md)
- [ExtendedLaunchMetric](metrickit/extendedlaunchmetric.md)
- [HitchTimeMetric](metrickit/hitchtimemetric.md)
- [ScrollHitchTimeMetric](metrickit/scrollhitchtimemetric.md)
