Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import java.util.concurrent.TimeUnit;
import org.junit.Test;
import io.reactivex.Observable;
public class SampleTest {
public void test() throws Exception {
Observable.interval(50, TimeUnit.MILLISECONDS)
.doOnNext(v -> {
if (v % 20 == 0) {
System.out.println("--------- second: " + v / 20);
.sample(200, TimeUnit.MILLISECONDS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.