본문
180206(화) - RxJava2 (timer)
Mobile/RxJava2 2018. 2. 6. 10:00
RxJava2
timer
create an Observable that emits a particular item after a given delay
timer
@CheckReturnValue @BackpressureSupport(value=ERROR) @SchedulerSupport(value="io.reactivex:computation") public static Flowable<java.lang.Long> timer(long delay, java.util.concurrent.TimeUnit unit)
Returns a Flowable that emits
0L
after a specified delay, and then completes.- Backpressure:
- This operator does not support backpressure as it uses time. If the downstream needs a slower rate it should slow the timer or use something like
onBackpressureDrop()
. - Scheduler:
timer
operates by default on thecomputation
Scheduler
.
- Parameters:
delay
- the initial delay before emitting a single0L
unit
- time units to use fordelay
- Returns:
- a Flowable that emits
0L
after a specified delay, and then completes - See Also:
- ReactiveX operators documentation: Timer
timer
@CheckReturnValue @BackpressureSupport(value=ERROR) @SchedulerSupport(value="custom") public static Flowable<java.lang.Long> timer(long delay, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
Returns a Flowable that emits0L
after a specified delay, on a specified Scheduler, and then completes.- Backpressure:
- This operator does not support backpressure as it uses time. If the downstream needs a slower rate it should slow the timer or use something like
onBackpressureDrop()
. - Scheduler:
- You specify which
Scheduler
this operator will use.
- Parameters:
delay
- the initial delay before emitting a single 0Lunit
- time units to use fordelay
scheduler
- theScheduler
to use for scheduling the item- Returns:
- a Flowable that emits
0L
after a specified delay, on a specified Scheduler, and then completes - See Also:
- ReactiveX operators documentation: Timer
'Mobile > RxJava2' 카테고리의 다른 글
180315(목) - RxJava2 (concatMap) (0) | 2018.03.15 |
---|---|
180107(수) - RxJava2 (buffer) (0) | 2018.02.07 |
180205(월) - RxJava2 (start) (0) | 2018.02.05 |
180104(목) - RxJava2 (repeat) (0) | 2018.01.04 |
180103(수) - RxJava2 (range) (0) | 2018.01.03 |
댓글