public class TimeValue extends Object implements Serializable
Constructor and Description |
---|
TimeValue(long time,
TimeUnit timeUnit) |
Modifier and Type | Method and Description |
---|---|
long |
convertTo(TimeUnit tu) |
static TimeValue |
days(long v) |
boolean |
equals(Object obj) |
static TimeValue |
fromString(String timeString) |
long |
getTime() |
TimeUnit |
getTimeUnit() |
int |
hashCode() |
static TimeValue |
hours(long v) |
static TimeValue |
microseconds(long v) |
static TimeValue |
milliseconds(long v) |
static TimeValue |
minutes(long v) |
static TimeValue |
nanoseconds(long v) |
static TimeValue |
seconds(long v) |
void |
sleep() |
String |
toString() |
static String |
tuToString(TimeUnit timeUnit)
Converts timeunit to stringly representation.
|
static TimeValue |
valueOf(String timeString)
Parses time value from a string representation.
|
public static final TimeValue NONE
public TimeValue(long time, TimeUnit timeUnit)
public static TimeValue days(long v)
public static TimeValue hours(long v)
public static TimeValue microseconds(long v)
public static TimeValue milliseconds(long v)
public static TimeValue minutes(long v)
public static TimeValue nanoseconds(long v)
public static TimeValue seconds(long v)
public long getTime()
public long convertTo(TimeUnit tu)
public TimeUnit getTimeUnit()
public static String tuToString(TimeUnit timeUnit)
timeUnit
- timeunit to convertpublic static TimeValue valueOf(String timeString)
timeString
- string representation of a time valuepublic void sleep() throws InterruptedException
InterruptedException
Copyright © 2012–2020 Oracle. All rights reserved.