org.sonatype.sisu.goodies.common
Class Time
java.lang.Object
org.sonatype.sisu.goodies.common.Time
public class Time
- extends Object
Representation of a specific unit of time.
Supports:
- NANOSECONDS
- MICROSECONDS
- MILLISECONDS
- MINUTES
- HOURS
- DAYS
- Since:
- 1.0
Time
public Time(long value,
TimeUnit unit)
getValue
@Deprecated
public long getValue()
- Deprecated.
value
public long value()
- Since:
- 1.1
getUnit
@Deprecated
public TimeUnit getUnit()
- Deprecated.
unit
public TimeUnit unit()
- Since:
- 1.1
toNanos
public long toNanos()
toNanosI
public int toNanosI()
- Since:
- 1.1
asNanos
public Time asNanos()
- Since:
- 1.1
toMicros
public long toMicros()
toMicrosI
public int toMicrosI()
- Since:
- 1.1
asMicros
public Time asMicros()
- Since:
- 1.1
toMillis
public long toMillis()
toMillisI
public int toMillisI()
- Since:
- 1.1
asMillis
public Time asMillis()
- Since:
- 1.1
toSeconds
public long toSeconds()
toSecondsI
public int toSecondsI()
- Since:
- 1.1
asSeconds
public Time asSeconds()
- Since:
- 1.1
toMinutes
public long toMinutes()
toMinutesI
public int toMinutesI()
- Since:
- 1.1
asMinutes
public Time asMinutes()
- Since:
- 1.1
toHours
public long toHours()
toHoursI
public int toHoursI()
- Since:
- 1.1
asHours
public Time asHours()
- Since:
- 1.1
toDays
public long toDays()
toDaysI
public int toDaysI()
- Since:
- 1.1
asDays
public Time asDays()
- Since:
- 1.1
sleep
public void sleep()
throws InterruptedException
- Throws:
InterruptedException
wait
public void wait(Object obj)
throws InterruptedException
- Throws:
InterruptedException
join
public void join(Thread thread)
throws InterruptedException
- Throws:
InterruptedException
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
time
public static Time time(long value,
TimeUnit unit)
nanos
public static Time nanos(long value)
micros
public static Time micros(long value)
millis
public static Time millis(long value)
seconds
public static Time seconds(long value)
minutes
public static Time minutes(long value)
hours
public static Time hours(long value)
days
public static Time days(long value)
parse
public static Time parse(@NonNls
String value)
- Since:
- 1.1
Copyright © 2008-2012 Sonatype, Inc.. All Rights Reserved.