Created
August 19, 2018 09:15
-
-
Save anitaa1990/e6e50132c6e1116e9c0c2fffe5a4d18e 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.interval(100, TimeUnit.MILLISECONDS) | |
.take(3) | |
.timeInterval() | |
.subscribe(new Subject<Timed<Long>>() { | |
@Override | |
public boolean hasObservers() { | |
return false; | |
} | |
@Override | |
public boolean hasThrowable() { | |
return false; | |
} | |
@Override | |
public boolean hasComplete() { | |
return false; | |
} | |
@Override | |
public Throwable getThrowable() { | |
return null; | |
} | |
@Override | |
protected void subscribeActual(Observer<? super Timed<Long>> observer) { | |
} | |
@Override | |
public void onSubscribe(Disposable d) { | |
} | |
@Override | |
public void onNext(Timed<Long> longTimed) { | |
System.out.println("onNext: " + longTimed); | |
} | |
@Override | |
public void onError(Throwable e) { | |
} | |
@Override | |
public void onComplete() { | |
} | |
}); | |
Thread.sleep(3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment