public final class TimeUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.time.Duration |
getDuration(java.time.Instant started,
java.time.Instant finished)
Get the duration between when something was started and finished.
|
public static java.time.Duration getDuration(@Nullable java.time.Instant started, @Nullable java.time.Instant finished)
started
- The start time. Can be null will automatically set the duration to 0finished
- The finish time. If null will use (current time - started time) to get the duration