---
title: duration
framework: realitykit
role: symbol
role_heading: Instance Property
path: realitykit/animationdefinition/duration
---

# duration

The total playback time of the animation.

## Declaration

```swift
var duration: TimeInterval { get }
```

## Discussion

Discussion The framework sets a value for this property depending on the underlying animation data and the specified speed. You can override the default duration by defining trimStart, trimEnd, or trimDuration.

## See Also

### Timing the animation

- [speed](realitykit/animationdefinition/speed.md)
- [delay](realitykit/animationdefinition/delay.md)
- [offset](realitykit/animationdefinition/offset.md)
- [trimDuration](realitykit/animationdefinition/trimduration.md)
- [trimStart](realitykit/animationdefinition/trimstart.md)
- [trimEnd](realitykit/animationdefinition/trimend.md)
- [trimmed(start:end:duration:)](realitykit/animationdefinition/trimmed(start:end:duration:).md)
