public class Duration
extends java.lang.Object
Constructor and Description |
---|
Duration()
Creates a new Duration whose start time is now.
|
Modifier and Type | Method and Description |
---|---|
static double |
currentTimeMillis()
Returns the same result as
System.currentTimeMillis() , but as a
double. |
int |
elapsedMillis()
Returns the number of milliseconds that have elapsed since this object was
created.
|
double |
getStartMillis()
Returns the time when the object was created.
|
public static double currentTimeMillis()
System.currentTimeMillis()
, but as a
double. Because emulated long math is significantly slower than doubles in
Production Mode, this method is to be preferred.public int elapsedMillis()
public double getStartMillis()