forked from I2P_Developers/i2p.i2p
merge of '89268c439b2c0098fe4dd039cb032f5c5717a2e5'
and 'de08714d459702cd7ba8c86570c747dca157ed26'
This commit is contained in:
15
launchers/macosx/CommonCode/Utils/DispatchQueue+delay.swift
Normal file
15
launchers/macosx/CommonCode/Utils/DispatchQueue+delay.swift
Normal file
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user