Created
July 20, 2019 04:02
-
-
Save nhphong/51b192603b9d27c2869d4a4b6b807f2b 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