Created
January 23, 2020 07:45
-
-
Save CODINGSAINT/ba2f2fd9d301642ec7e8c87ba8e7e89f 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
package com.codingsaint.learning.rxjava.observables; | |
import com.codingsaint.learning.rxjava.observer.DemoObserver; | |
import com.codingsaint.learning.rxjava.utils.RxUtils; | |
import io.reactivex.Observable; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import java.util.concurrent.TimeUnit; | |
public class ObservableUsingInterval { | |
private static final Logger LOGGER = LoggerFactory.getLogger(ObservableUsingInterval.class); | |
public static void main(String... args) { | |
Observable.interval(1, TimeUnit.SECONDS) | |
.subscribe(new DemoObserver()); | |
RxUtils.sleep(3000); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment