Created
August 19, 2018 09:29
-
-
Save anitaa1990/b154fc63e82c58181fe83c409dc457a7 to your computer and use it in GitHub Desktop.
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
Observable.just(1l, 2l, 3l, 4l, 5l, 6l) | |
.timer(1, TimeUnit.SECONDS) | |
.timeout(500, TimeUnit.MILLISECONDS) | |
.subscribe(new Observer<Long>() { | |
@Override | |
public void onSubscribe(Disposable d) { | |
} | |
@Override | |
public void onNext(Long aLong) { | |
System.out.println("onNext: " + aLong); | |
} | |
@Override | |
public void onError(Throwable e) { | |
e.printStackTrace(); | |
System.out.println("onError: "); | |
} | |
@Override | |
public void onComplete() { | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment