Created
March 13, 2020 11:04
-
-
Save vamjakuldip/b01416df90cb293f89d6772e6a1d7b1a to your computer and use it in GitHub Desktop.
Delay Each item with specific delay.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun <T> Observable<T>.delayEach(interval: Long, timeUnit: TimeUnit): Observable<T> = Observable.zip(this, Observable.interval(interval, timeUnit), BiFunction { item, _ -> item }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment