Example usage for Java java.util.concurrent TimeUnit fields, constructors, methods, implement or subclass
The text is from its open source code.
TimeUnit | NANOSECONDS Time unit representing one thousandth of a microsecond. |
TimeUnit | MICROSECONDS Time unit representing one thousandth of a millisecond. |
TimeUnit | MILLISECONDS Time unit representing one thousandth of a second. |
TimeUnit | SECONDS Time unit representing one second. |
TimeUnit | MINUTES Time unit representing sixty seconds. |
TimeUnit | HOURS Time unit representing sixty minutes. |
TimeUnit | DAYS Time unit representing twenty four hours. |
long | convert(long sourceDuration, TimeUnit sourceUnit) Converts the given time duration in the given unit to this unit. |
void | sleep(long timeout) Performs a Thread#sleep(long,int) Thread.sleep using this time unit. |
void | timedWait(Object obj, long timeout) Performs a timed Object#wait(long,int) Object.wait using this time unit. |
long | toDays(long duration) Equivalent to #convert(long,TimeUnit) DAYS.convert(duration, this) . |
long | toHours(long duration) Equivalent to #convert(long,TimeUnit) HOURS.convert(duration, this) . |
long | toMicros(long duration) Equivalent to #convert(long,TimeUnit) MICROSECONDS.convert(duration, this) . |
long | toMillis(long duration) Equivalent to #convert(long,TimeUnit) MILLISECONDS.convert(duration, this) . |
long | toMinutes(long duration) Equivalent to #convert(long,TimeUnit) MINUTES.convert(duration, this) . |
long | toNanos(long duration) Equivalent to #convert(long,TimeUnit) NANOSECONDS.convert(duration, this) . |
long | toSeconds(long duration) Equivalent to #convert(long,TimeUnit) SECONDS.convert(duration, this) . |
String | toString() Returns a string representation of the object. |