Skip to content

Instantly share code, notes, and snippets.

@vamjakuldip
Created March 13, 2020 11:04
Show Gist options
  • Save vamjakuldip/b01416df90cb293f89d6772e6a1d7b1a to your computer and use it in GitHub Desktop.
Save vamjakuldip/b01416df90cb293f89d6772e6a1d7b1a to your computer and use it in GitHub Desktop.
Delay Each item with specific delay.
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