Reputation: 51
Consider the following case:
Upvotes: 1
Views: 351
Reputation: 12023
in Rxjava 2, you should use debounce operator which emit an item from an Observable if a particular timespan has passed without it emitting another item
.debounce(300, TimeUnit.MILLISECONDS)
Upvotes: 0
Reputation: 51
With rxjava2, You can use:
.throttleFirst(1, TimeUnit.SECONDS)
From the javadoc documentation:
throttleFirst: Returns an Observable that emits only the first item emitted by the source ObservableSource during sequential time windows of a specified duration.
Upvotes: 1