Skip to content

Instantly share code, notes, and snippets.

@anitaa1990
Created August 19, 2018 09:33
Show Gist options
  • Save anitaa1990/a911f270e287f2e0c1d5342456f63fa7 to your computer and use it in GitHub Desktop.
Save anitaa1990/a911f270e287f2e0c1d5342456f63fa7 to your computer and use it in GitHub Desktop.
Observable.interval(100, TimeUnit.MILLISECONDS)
.take(3)
.timestamp()
.subscribe(new Observer<Timed<Long>>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(Timed<Long> longTimed) {
System.out.println(longTimed);
}
@Override
public void onError(Throwable e) {
}
@Override
public void onComplete() {
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment