Skip to content

Commit

Permalink
Update SupportCode of Rx.playground
Browse files Browse the repository at this point in the history
  • Loading branch information
Weihang Lo committed Dec 14, 2016
1 parent 582807e commit b7b7e87
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Rx.playground/Sources/SupportCode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ public enum TestError: Swift.Error {
*/
public func delay(_ delay: Double, closure: @escaping (Void) -> Void) {

let delayTime = DispatchTime.now() + DispatchTimeInterval.seconds(Int(delay))
DispatchQueue.main.asyncAfter(deadline: delayTime) {
DispatchQueue.main.asyncAfter(deadline: .now() + delay) {
closure()
}
}
Expand Down

0 comments on commit b7b7e87

Please sign in to comment.