public class Duration extends Object
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
hashCode() |
long |
in(TimeUnit unit)
Converts this durtation to the given unit of time.
|
String |
toString() |
public Duration(long time,
TimeUnit unit)
time - The amount of time.unit - The unit of time.public long in(TimeUnit unit)
unit - The time unit to convert to.Copyright © 2015. All rights reserved.