<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: -",
    "macOS: 10.10.0 -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Dispatch",
  "identifier" : "/documentation/Dispatch/DispatchQueue/asyncAfter(deadline:execute:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Dispatch"
    ],
    "preciseIdentifier" : "s:So17OS_dispatch_queueC8DispatchE10asyncAfter8deadline7executeyAC0D4TimeV_AC0D8WorkItemCtF"
  },
  "title" : "asyncAfter(deadline:execute:)"
}
-->

# asyncAfter(deadline:execute:)

Schedules a work item for execution at the specified time, and returns immediately.

```
func asyncAfter(deadline: DispatchTime, execute: DispatchWorkItem)
```

## Parameters

`deadline`

The time at which to schedule the work item for execution. Specifying the current time is less efficient than calling the [`async(execute:)`](/documentation/Dispatch/DispatchQueue/async(execute:)) method directly. Do not specify the value in [`distantFuture`](/documentation/Dispatch/DispatchTime/distantFuture); doing so is undefined.

`execute`

The work item containing the task to execute. For information on how to create this work item, see [`DispatchWorkItem`](/documentation/Dispatch/DispatchWorkItem).

## Discussion

---

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)