Instance Methodswift 6.1.2Dispatch

asyncAfter(deadline:execute:)

Submits a work item to a dispatch queue for asynchronous execution after a specified time.

iOS
8.0+
macOS
10.10+
func asyncAfter(deadline: DispatchTime, execute: DispatchWorkItem)

Parameters

deadline

the time after which the work item should be executed, given as a DispatchTime.

execute

The work item to be invoked on the queue.