Skip to content

Commit

Permalink
Fix 'ambiguous use of X' building error on delay function
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeehut committed Mar 29, 2024
1 parent 8d18f32 commit 1ea6ae3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/HandySwift/Globals.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public func delay(by timeInterval: TimeInterval, qosClass: DispatchQoS.QoSClass?
/// - duration: The duration of the delay. E.g., `.seconds(1)` or `.milliseconds(200)`.
/// - qosClass: The global QoS class to be used or `nil` to use the main thread. Defaults to `nil`.
/// - closure: The code to run with a delay.
@_disfavoredOverload
@available(iOS 16, macOS 13, tvOS 16, visionOS 1, watchOS 9, *)
public func delay(by duration: Duration, qosClass: DispatchQoS.QoSClass? = nil, _ closure: @escaping () -> Void) {
let dispatchQueue = qosClass != nil ? DispatchQueue.global(qos: qosClass!) : DispatchQueue.main
Expand Down

0 comments on commit 1ea6ae3

Please sign in to comment.