Created
July 20, 2019 03:51
-
-
Save nhphong/aedfd3cbd6d300758a9eb01ca257fb0e 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
val scheduler = TestScheduler() | |
val source = Observable.just(1) | |
.doOnSubscribe { | |
println("Hello World") | |
} | |
source | |
.debounceIf({ it == 1 }, 2, SECONDS, scheduler) | |
.test() | |
scheduler.advanceTimeBy(2, SECONDS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment