RxTimer provides an easy to use RxSwift binding for NSTimer.
NSTimer.rx_timer
.subscribeNext { _ in
print("timer triggered")
}
.addDisposableTo(disposeBag)
NSTimer.rx.timer(10)
.subscribeNext { _ in
print("timer triggered")
}
.addDisposableTo(disposeBag)
NSTimer.rx.timer(10)
.skip(1)
.subscribeNext { _ in
print("timer triggered")
}
.addDisposableTo(disposeBag)
NSTimer.rx.timer(10)
.take(10)
.subscribeNext { _ in
print("timer triggered")
}
.addDisposableTo(disposeBag)
pod 'RxTimer'
Cartfile
github "bmoliveira/RxTimer" ~> 1.3
And that'll be 👌
MIT License.