Java java.util.concurrent TimeUnit fields, constructors, methods, implement or subclass

Example usage for Java java.util.concurrent TimeUnit fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.util.concurrent TimeUnit.

The text is from its open source code.

Field

TimeUnitNANOSECONDS
Time unit representing one thousandth of a microsecond.
TimeUnitMICROSECONDS
Time unit representing one thousandth of a millisecond.
TimeUnitMILLISECONDS
Time unit representing one thousandth of a second.
TimeUnitSECONDS
Time unit representing one second.
TimeUnitMINUTES
Time unit representing sixty seconds.
TimeUnitHOURS
Time unit representing sixty minutes.
TimeUnitDAYS
Time unit representing twenty four hours.

Method

longconvert(long sourceDuration, TimeUnit sourceUnit)
Converts the given time duration in the given unit to this unit.
voidsleep(long timeout)
Performs a Thread#sleep(long,int) Thread.sleep using this time unit.
voidtimedWait(Object obj, long timeout)
Performs a timed Object#wait(long,int) Object.wait using this time unit.
longtoDays(long duration)
Equivalent to #convert(long,TimeUnit) DAYS.convert(duration, this) .
longtoHours(long duration)
Equivalent to #convert(long,TimeUnit) HOURS.convert(duration, this) .
longtoMicros(long duration)
Equivalent to #convert(long,TimeUnit) MICROSECONDS.convert(duration, this) .
longtoMillis(long duration)
Equivalent to #convert(long,TimeUnit) MILLISECONDS.convert(duration, this) .
longtoMinutes(long duration)
Equivalent to #convert(long,TimeUnit) MINUTES.convert(duration, this) .
longtoNanos(long duration)
Equivalent to #convert(long,TimeUnit) NANOSECONDS.convert(duration, this) .
longtoSeconds(long duration)
Equivalent to #convert(long,TimeUnit) SECONDS.convert(duration, this) .
StringtoString()
Returns a string representation of the object.