---
title: "asyncAfter(deadline:execute:)"
framework: dispatch
role: symbol
role_heading: Instance Method
path: "dispatch/dispatchqueue/asyncafter(deadline:execute:)"
---

# asyncAfter(deadline:execute:)

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

## Declaration

```swift
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 doc://com.apple.dispatch/documentation/Dispatch/DispatchQueue/async(execute:) method directly. Do not specify the value in doc://com.apple.dispatch/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 doc://com.apple.dispatch/documentation/Dispatch/DispatchWorkItem.

## See Also

### Executing Tasks Asynchronously

- [async(execute:)](dispatch/dispatchqueue/async(execute:).md)
- [asyncAfter(deadline:qos:flags:execute:)](dispatch/dispatchqueue/asyncafter(deadline:qos:flags:execute:).md)
- [asyncAfter(wallDeadline:execute:)](dispatch/dispatchqueue/asyncafter(walldeadline:execute:).md)
- [asyncAfter(wallDeadline:qos:flags:execute:)](dispatch/dispatchqueue/asyncafter(walldeadline:qos:flags:execute:).md)
