Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Michael #41

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Source/Shared/Functions.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

public func delay(delay:Double, closure: () -> Void) {
public func delay(delay:Double, @autoclosure(escaping) closure: () -> Void) {
dispatch_after(
dispatch_time(
DISPATCH_TIME_NOW,
Expand All @@ -17,7 +17,7 @@ public enum DispatchQueue {
case Main, Interactive, Initiated, Utility, Background, Custom(dispatch_queue_t)
}

public func dispatch(queue queueType: DispatchQueue = .Main, closure: () -> Void) {
public func dispatch(queue queueType: DispatchQueue = .Main, @autoclosure(escaping) closure: () -> Void) {
let queue: dispatch_queue_t

switch queueType {
Expand Down
2 changes: 1 addition & 1 deletion Source/Shared/UnitTesting.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public struct UnitTesting {
return NSProcessInfo.processInfo().environment["XCInjectBundle"] != nil
}

public static func measure(closure: () -> Void) -> Float {
public static func measure(@noescape closure: () -> Void) -> Float {
let start = CACurrentMediaTime()
closure()
let end = CACurrentMediaTime()
Expand Down