Package com.google.gwt.core.client
Class Duration
java.lang.Object
com.google.gwt.core.client.Duration
A utility class for measuring elapsed time.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
Returns the same result asSystem.currentTimeMillis()
, but as a double.int
Returns the number of milliseconds that have elapsed since this object was created.double
Returns the time when the object was created.
-
Constructor Details
-
Duration
public Duration()Creates a new Duration whose start time is now.
-
-
Method Details
-
currentTimeMillis
public static double currentTimeMillis()Returns the same result asSystem.currentTimeMillis()
, but as a double. Because emulated long math is significantly slower than doubles in Production Mode, this method is to be preferred. -
elapsedMillis
public int elapsedMillis()Returns the number of milliseconds that have elapsed since this object was created. -
getStartMillis
public double getStartMillis()Returns the time when the object was created.
-