Latest 1.0.0
License MIT
Platforms ios 8.0, requires ARC

Every.Swift – A Convenient NSTimer Wrapper


Provided that your class implement TimerManageable protocol you just do:

self.every(3.seconds) {
    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:

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.


  • [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.

Latest podspec

    "name": "Every.swift",
    "version": "1.0.0",
    "summary": "An Swift wrapper for NSTimer",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Samhan": "[email protected]"
    "social_media_url": "",
    "platforms": {
        "ios": "8.0"
    "requires_arc": true,
    "source": {
        "git": "",
        "tag": "v1.0.0",
        "submodules": true
    "source_files": "src/**/*.{h,swift}"

Pin It on Pinterest

Share This