public final class TimeUtils
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
TimeUtils()
Protected constructor for utility class.
|
Modifier and Type | Method and Description |
---|---|
static java.time.Duration |
getDuration(java.util.Date started,
java.util.Date finished)
Get the duration between when something was started and finished.
|
public static java.time.Duration getDuration(java.util.Date started, java.util.Date 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