---
title: XCTClockMetric
framework: xctest
role: symbol
role_heading: Class
path: xctest/xctclockmetric
---

# XCTClockMetric

A metric to record the time that elapses during a performance test.

## Declaration

```swift
class XCTClockMetric
```

## Overview

Overview XCTClockMetric measures the total elapsed time during execution of the block argument to measure(metrics:block:). The metric records time monotonically, regardless of changes to the system clock. Its result includes time spent executing code under test, and time when the CPU is idle or running other code.

## Topics

### Initializing an Item

- [init()](xctest/xctclockmetric/init().md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [XCTMetric](xctest/xctmetric.md)

## See Also

### Measurement Metrics

- [XCTMetric](xctest/xctmetric.md)
- [XCTCPUMetric](xctest/xctcpumetric.md)
- [XCTHitchMetric](xctest/xcthitchmetric.md)
- [XCTMemoryMetric](xctest/xctmemorymetric.md)
- [XCTOSSignpostMetric](xctest/xctossignpostmetric.md)
- [XCTStorageMetric](xctest/xctstoragemetric.md)
- [XCTApplicationLaunchMetric](xctest/xctapplicationlaunchmetric.md)
