Class TimeSpan
- java.lang.Object
-
- biz.gabrys.maven.plugin.util.timer.TimeSpan
-
-
Constructor Summary
Constructors Constructor Description TimeSpan(long milliseconds)
Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
int
hashCode()
long
toMilliseconds()
Returns milliseconds representation ofthis
object.String
toString()
Returns a string representation of the time span in human-readable format.
-
-
-
Method Detail
-
toMilliseconds
public long toMilliseconds()
Returns milliseconds representation ofthis
object.- Returns:
- this in milliseconds.
- Since:
- 2.0.0
-
toString
public String toString()
Returns a string representation of the time span in human-readable format. Examples:0 seconds 589 milliseconds 1 second 57 seconds 42 milliseconds 1 minute 2 minutes 1 millisecond 7 minutes 1 second 12 minutes 28 seconds 321 milliseconds 1 hour 5 hours 5 hours 1 second 5 hours 1 minute 54 seconds 132 milliseconds 5 hours 9 minutes 4 seconds 123 milliseconds
-
-