Skip to content

Include NSTimer in block?#18

@efremidze

Description

@efremidze

What are your thoughts about including the timer object in the block?

public class func every(interval: NSTimeInterval, _ block: NSTimer -> Void) -> NSTimer{} 

Otherwise I need to declare the variable separately like this:

var timer: NSTimer? timer = NSTimer.every(5.seconds){timer?.invalidate() } 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions