0

Is there a way to throttle method calls i.e only take the first event within a certain window duration. I have seen examples of RxBinding like

RxView.clicks(mButton)
            .throttleFirst(300, TimeUnit.MILLISECONDS, AndroidSchedulers.mainThread())
            .subscribe(...);

How can I do the above to a method ?

Veeresh Charantimath
  • 4,641
  • 5
  • 27
  • 36

1 Answers1

-1

In RxJava2 there is such operator - http://reactivex.io/documentation/operators/sample.html

Mamykin Andrey
  • 1,352
  • 10
  • 13