Contents

asyncAfter(deadline:execute:)

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

Declaration

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:) method directly. Do not specify the value in 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.

See Also

Executing Tasks Asynchronously