Package reactor.core.publisher
Interface Timed<T>
- All Superinterfaces:
Supplier<T>
- Author:
- Simon Baslé
-
Method Summary
Modifier and TypeMethodDescriptionelapsed()Get the elapsedDurationsince the previous onNext (or onSubscribe in case this represents the first onNext).Get the elapsedDurationsince the subscription (onSubscribe signal).get()Get the value wrapped by thisTimed.Get the timestamp of the emission of this timed onNext, as anInstant.
-
Method Details
-
get
T get()Get the value wrapped by thisTimed. -
elapsed
Duration elapsed()Get the elapsedDurationsince the previous onNext (or onSubscribe in case this represents the first onNext). If possible, nanosecond resolution is used.- Returns:
- the elapsed
Durationsince the previous onNext
-
elapsedSinceSubscription
Duration elapsedSinceSubscription()Get the elapsedDurationsince the subscription (onSubscribe signal). If possible, nanosecond resolution is used.- Returns:
- the elapsed
Durationsince subscription
-
timestamp
Instant timestamp()Get the timestamp of the emission of this timed onNext, as anInstant. It has the same resolution asInstant.ofEpochMilli(long).- Returns:
- the epoch timestamp
Instantfor this timed onNext
-