diff --git a/launchers/macosx/CommonCode/Utils/DispatchQueue+delay.swift b/launchers/macosx/CommonCode/Utils/DispatchQueue+delay.swift new file mode 100644 index 0000000000..a334cbb18a --- /dev/null +++ b/launchers/macosx/CommonCode/Utils/DispatchQueue+delay.swift @@ -0,0 +1,15 @@ +// +// DispatchQueue+delay.swift +// I2PLauncher +// +// Created by Mikal Villa on 24/04/2019. +// Copyright © 2019 The I2P Project. All rights reserved. +// + +import Foundation + +extension DispatchQueue { + static func delay(_ delay: DispatchTimeInterval, closure: @escaping () -> ()) { + DispatchQueue.main.asyncAfter(deadline: .now() + delay, execute: closure) + } +}