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
}