Discrete process that every d
emits elapsed duration
since the start time of stream consumption.
Discrete process that every d
emits elapsed duration
since the start time of stream consumption.
For example: awakeEvery(5 seconds)
will
return (approximately) 5s, 10s, 20s
, and will lie dormant
between emitted values.
By default, this uses a shared ScheduledExecutorService
for the timed events, and runs the consumer using the pool
Strategy
,
to allow for the process to decide whether result shall be run on
different thread pool, or with Strategy.Sequential
on the
same thread pool as the scheduler.
Duration between emits of the resulting process
Strategy to run the process
Scheduler used to schedule tasks
A continuous stream of the elapsed time, computed using System.nanoTime
.
A continuous stream of the elapsed time, computed using System.nanoTime
.
Note that the actual granularity of these elapsed times depends on the OS, for instance
the OS may only update the current time every ten milliseconds or so.
A 'continuous' stream which is true after d, 2d, 3d...
elapsed duration,
and false otherwise.
A 'continuous' stream which is true after d, 2d, 3d...
elapsed duration,
and false otherwise.
If you'd like a 'discrete' stream that will actually block until d
has elapsed,
use awakeEvery
instead.
A single-element Process
that waits for the duration d
before emitting its value.
A single-element Process
that waits for the duration d
before emitting its value. This uses a shared
ScheduledThreadPoolExecutor
to signal duration and
avoid blocking on thread. After the signal,
the execution continues with S
strategy