source: launchers/macosx/CommonCode/Utils/DispatchQueue+delay.swift @ fa2897d

Last change on this file since fa2897d was fa2897d, checked in by meeh <meeh@…>, 2 years ago

Mac OSX Launcher: Delay extension for the DispatchQueue? Cocoa/OSX class.

  • Property mode set to 100644
File size: 369 bytes
Line 
1//
2//  DispatchQueue+delay.swift
3//  I2PLauncher
4//
5//  Created by Mikal Villa on 24/04/2019.
6//  Copyright © 2019 The I2P Project. All rights reserved.
7//
8
9import Foundation
10
11extension DispatchQueue {
12  static func delay(_ delay: DispatchTimeInterval, closure: @escaping () -> ()) {
13    DispatchQueue.main.asyncAfter(deadline: .now() + delay, execute: closure)
14  }
15}
Note: See TracBrowser for help on using the repository browser.