swift 3.0 beta4 dispatch_after

let dispatchTime: DispatchTime = DispatchTime.now() + Double(Int64(0.1 * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC)
DispatchQueue.main.asyncAfter(deadline: dispatchTime, execute: {
    // your function here
})

或者

DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
    // your function here
}

Stackoverflow

你可能感兴趣的:(swift 3.0 beta4 dispatch_after)