---
title: duration
framework: corehaptics
role: symbol
role_heading: Instance Property
path: corehaptics/chhapticevent/duration
---

# duration

The duration of the haptic event.

## Declaration

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

## Discussion

Discussion The maximum duration of a continuous haptic event is 30 seconds.

## See Also

### Configuring Haptic Events

- [eventParameters](corehaptics/chhapticevent/eventparameters.md)
- [CHHapticEvent.ParameterID](corehaptics/chhapticevent/parameterid.md)
- [relativeTime](corehaptics/chhapticevent/relativetime.md)
