Constructor and Description |
---|
Time(long milliseconds)
Constructs a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
long |
toMilliseconds()
Returns milliseconds representation of
this object. |
String |
toString()
Returns a string representation of the time in human-readable format.
|
public Time(long milliseconds)
milliseconds
- a counted time in the milliseconds.public long toMilliseconds()
this
object.public String toString()
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
Copyright © 2015–2016 gabrys.biz. All rights reserved.