본문
180206(화) - RxJava2 (timer)
Mobile/RxJava2 2018. 2. 6. 10:00
RxJava2
timer
create an Observable that emits a particular item after a given delay

The Timer operator creates an Observable that emits one particular item after a span of time that you specify.
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:
timeroperates by default on thecomputationScheduler.
- Parameters:
delay- the initial delay before emitting a single0Lunit- time units to use fordelay- Returns:
- a Flowable that emits
0Lafter 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 emits0Lafter 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
Schedulerthis operator will use.
- Parameters:
delay- the initial delay before emitting a single 0Lunit- time units to use fordelayscheduler- theSchedulerto use for scheduling the item- Returns:
- a Flowable that emits
0Lafter 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 |
댓글