---
title: TimeLimitTrait.Duration
framework: testing
role: symbol
role_heading: Structure
path: testing/timelimittrait/duration
---

# TimeLimitTrait.Duration

A type representing the duration of a time limit applied to a test.

## Declaration

```swift
struct Duration
```

## Overview

Overview Use this type to specify a test timeout with TimeLimitTrait. TimeLimitTrait uses this type instead of Swift’s built-in Duration type because the testing library doesn’t support high-precision, arbitrarily short durations for test timeouts. The smallest unit of time you can specify in a Duration is minutes.

## Topics

### Type Methods

- [minutes(_:)](testing/timelimittrait/duration/minutes(_:).md)

## Relationships

### Conforms To

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
