Skip to content

Instantly share code, notes, and snippets.

@FireZenk
Last active May 2, 2017 19:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FireZenk/385b22d69c04479061f0c883cd158572 to your computer and use it in GitHub Desktop.
Save FireZenk/385b22d69c04479061f0c883cd158572 to your computer and use it in GitHub Desktop.
PublishSubject<Long> animationTimer;
Subscription animationSubscription;
animationSubscription = Observable.interval(1, TimeUnit.SECONDS)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.newThread())
.subscribe(animationTimer = PublishSubject.create());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment