---
title: "setPeriodicDelay(_:interval:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsbutton/setperiodicdelay(_:interval:)"
---

# setPeriodicDelay(_:interval:)

Sets the message delay and interval periods for a continuous button.

## Declaration

```swift
func setPeriodicDelay(_ delay: Float, interval: Float)
```

## Parameters

- `delay`: The amount of time (in seconds) that a continuous button will pause before starting to periodically send action messages to the target object. The maximum allowed value is 60.0 seconds; if a larger value is supplied, it is ignored, and 60.0 seconds is used.
- `interval`: The amount of time (in seconds) the continuous button will pause between sending each action message. The maximum value is 60.0 seconds; if a larger value is supplied, it is ignored, and 60.0 seconds is used.

## Discussion

Discussion The delay and interval values are used if the button is configured (by a isContinuous message) to continuously send the action message to the target object while tracking the mouse.

## See Also

### Related Documentation

- [isContinuous](appkit/nscontrol/iscontinuous.md)

### Configuring buttons

- [setButtonType(_:)](appkit/nsbutton/setbuttontype(_:).md)
- [getPeriodicDelay(_:interval:)](appkit/nsbutton/getperiodicdelay(_:interval:).md)
- [contentTintColor](appkit/nsbutton/contenttintcolor.md)
- [hasDestructiveAction](appkit/nsbutton/hasdestructiveaction.md)
- [alternateTitle](appkit/nsbutton/alternatetitle.md)
- [attributedTitle](appkit/nsbutton/attributedtitle.md)
- [attributedAlternateTitle](appkit/nsbutton/attributedalternatetitle.md)
- [title](appkit/nsbutton/title.md)
- [symbolConfiguration](appkit/nsbutton/symbolconfiguration.md)
- [sound](appkit/nsbutton/sound.md)
- [isSpringLoaded](appkit/nsbutton/isspringloaded.md)
- [maxAcceleratorLevel](appkit/nsbutton/maxacceleratorlevel.md)
- [tintProminence](appkit/nsbutton/tintprominence.md)
- [NSTintProminence](appkit/nstintprominence.md)
- [borderShape](appkit/nsbutton/bordershape.md)
