com.google.gwt.core.client

## Class Duration

- java.lang.Object
- - com.google.gwt.core.client.Duration

-     public class Duration
      extends java.lang.Object

  A utility class for measuring elapsed time.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Duration()` Creates a new Duration whose start time is now.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Duration

          public Duration()

      Creates a new Duration whose start time is now.

  - ### Method Detail

    - #### currentTimeMillis

          public static double currentTimeMillis()

      Returns the same result as `System.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.