Class CurrentMillisClock

java.lang.Object
com.google.api.core.CurrentMillisClock
All Implemented Interfaces:
ApiClock, Serializable

public final class CurrentMillisClock extends Object implements ApiClock, Serializable
Implementation of the ApiClock interface, which uses System.currentTimeMillis() as time source.
See Also:
  • Method Details

    • getDefaultClock

      public static ApiClock getDefaultClock()
    • nanoTime

      public long nanoTime()
      Description copied from interface: ApiClock
      Returns the current value of this clock's high-resolution time source, in nanoseconds.
      Specified by:
      nanoTime in interface ApiClock
    • millisTime

      public long millisTime()
      Description copied from interface: ApiClock
      Returns the current value of this clock's high-resolution time source, in milliseconds.
      Specified by:
      millisTime in interface ApiClock