public interface Timed<T>
extends java.util.function.Supplier<T>
限定符和类型 | 方法和说明 |
---|---|
java.time.Duration |
elapsed()
Get the elapsed
Duration since the previous onNext (or onSubscribe in
case this represents the first onNext). |
java.time.Duration |
elapsedSinceSubscription()
Get the elapsed
Duration since the subscription (onSubscribe signal). |
T |
get()
Get the value wrapped by this
Timed . |
java.time.Instant |
timestamp()
Get the timestamp of the emission of this timed onNext, as an
Instant . |
T get()
Timed
.get
在接口中 java.util.function.Supplier<T>
java.time.Duration elapsed()
Duration
since the previous onNext (or onSubscribe in
case this represents the first onNext). If possible, nanosecond resolution is used.Duration
since the previous onNextjava.time.Duration elapsedSinceSubscription()
Duration
since the subscription (onSubscribe signal).
If possible, nanosecond resolution is used.Duration
since subscriptionjava.time.Instant timestamp()
Instant
.
It has the same resolution as Instant.ofEpochMilli(long)
.Instant
for this timed onNext