public class TimeSpan
extends java.lang.Object
Represents a time span.
Constructor and Description |
---|
TimeSpan(long time,
java.util.concurrent.TimeUnit timeUnit)
Instantiates a new
TimeSpan . |
Modifier and Type | Method and Description |
---|---|
long |
getTime()
The time.
|
java.util.concurrent.TimeUnit |
getTimeUnit()
The time unit.
|
void |
setTime(long time)
The time.
|
void |
setTimeUnit(java.util.concurrent.TimeUnit timeUnit)
The time unit.
|
static TimeSpan |
timeSpan(long time,
java.util.concurrent.TimeUnit timeUnit)
Creates a new
TimeSpan . |
public TimeSpan(long time, java.util.concurrent.TimeUnit timeUnit)
Instantiates a new TimeSpan
.
time
- the timetimeUnit
- the time unitpublic static TimeSpan timeSpan(long time, java.util.concurrent.TimeUnit timeUnit)
Creates a new TimeSpan
.
time
- the timetimeUnit
- the time unitpublic long getTime()
The time.
public java.util.concurrent.TimeUnit getTimeUnit()
The time unit.
public void setTime(long time)
The time.
time
- the timepublic void setTimeUnit(java.util.concurrent.TimeUnit timeUnit)
The time unit.
time
- the time unit