Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save martinomburajr/60916689a3ea901199839c06d1f738d3 to your computer and use it in GitHub Desktop.

Select an option

Save martinomburajr/60916689a3ea901199839c06d1f738d3 to your computer and use it in GitHub Desktop.
/******************** INTERVAL ***************************/
Observable.interval(1000,2000, TimeUnit.MILLISECONDS)
.subscribe(longObserver);
//Output
// E/RxJava2:Schedulers:: onSubscribe | main
// E/RxJava2:Schedulers:: onNext | 0
// E/RxJava2:Schedulers:: onNext | RxComputationThreadPool-1
// E/RxJava2:Schedulers:: onNext | 1
// E/RxJava2:Schedulers:: onNext | RxComputationThreadPool-1
// E/RxJava2:Schedulers:: onNext | 2
// E/RxJava2:Schedulers:: onNext | RxComputationThreadPool-1
// ... to infinite and beyond!
/******************** END OF INTERVAL ***************************/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment