CocoaPods trunk is moving to be read-only. Read more on the blog, there are 17 months to go.

JFTimerExt 0.0.1

JFTimerExt 0.0.1

Maintained by hx.



  • By
  • hxwxww

JFTimer

An extension for Timer with simple API

Use Mode:

.infinite
.finite(5)
.once

Use Interval:

.milliseconds(100)
.seconds(1.5)
.minutes(0.5)
.hours(3)
.days(1)

Usage:

  • once:
let timer = Timer.once(.seconds(10), handler: { (_) in
    ///
})
self.timer = timer
  • every:
let timer = Timer.every(.seconds(1), count: 5, handler: { (_) in
    ///
})
self.timer = timer
  • pause:
timer.pause()
  • resume:
timer.resume()