<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSButton/setPeriodicDelay(_:interval:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSButton(im)setPeriodicDelay:interval:"
  },
  "title" : "setPeriodicDelay(_:interval:)"
}
-->

# setPeriodicDelay(_:interval:)

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

```
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

The delay and interval values are used if the button is configured (by a [`isContinuous`](/documentation/AppKit/NSControl/isContinuous) message) to continuously send the action message to the target object while tracking the mouse.

## See Also

[`var isContinuous: Bool`](/documentation/AppKit/NSControl/isContinuous)

A Boolean value indicating whether the receiver’s cell sends its action message continuously to its target during mouse tracking.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)