Popularity
4.0
Declining
Activity
0.0
Stable
268
14
15

Code Quality Rank: L5
Programming language: Swift
License: BSD 2-clause "Simplified" License
Tags: Date & Time    
Latest version: v1.0.0

Every.swift alternatives and similar libraries

Based on the "Date & Time" category.
Alternatively, view Every.swift alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of Every.swift or a related project?

Add another 'Date & Time' Library

README

Every.Swift - A Convenient NSTimer Wrapper

Usage

Provided that your class implement TimerManageable protocol you just do:

self.every(3.seconds) {
    print("hello")
    return true
}

Prints "hello" every 3 seconds.

Return true from the closure to continue , false to invalidate the timer.

Alternatively , you can use the following method to invalidate all timers of the receiver: self.clearTimers()

Normally you're are responsible of invalidating the timers you created. If the timer is not invalidated before the object it's been tied to it will be invalidated next time the timer is elapsed and before calling the ElapsedHandler.

TODO :

  • [x] Investigate automatic invalidation of timer if owner is Swift object.
  • [x] Add a project and test target.
  • [ ] Improve unit test coverage.
  • [x] Support milliseconds.
  • [ ] Embed in a framework.
  • [ ] More representative example application.
  • [ ] OS X support.
  • [ ] Carthage support.
  • [x] CocoaPod support.