X Tutup
Skip to content

Commit 25cf3f3

Browse files
committed
Clean up
1 parent 01c7b1f commit 25cf3f3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Sources/SwiftyTimer.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ extension NSTimer {
4343
/// - Note: The `new` class function is a workaround for a crashing bug when using convenience initializers (rdar://18720947)
4444

4545
public class func new(every interval: NSTimeInterval, _ block: () -> Void) -> NSTimer {
46-
let actor = Actor { _ in block() }
47-
return self.init(timeInterval: interval, target: actor, selector: #selector(Actor.fire), userInfo: nil, repeats: true)
46+
return self.new(every: interval) { (_: NSTimer) in block() }
4847
}
4948

5049
/// Create a timer that will call `block` repeatedly in specified time intervals.

0 commit comments

Comments
 (0)
X Tutup