org.apache.hadoop.yarn.util

## Class SystemClock

- java.lang.Object
- - org.apache.hadoop.yarn.util.SystemClock

- All Implemented Interfaces:
    Clock

      @InterfaceAudience.Public
       @InterfaceStability.Stable
      public final class SystemClock
      extends Object
      implements Clock

  Implementation of `Clock` that gives the current time from the system clock in milliseconds. NOTE: Do not use this to calculate a duration of expire or interval to sleep, because it will be broken by settimeofday. Please use `MonotonicClock` instead.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SystemClock()` Deprecated.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SystemClock` | `getInstance()`
    `long` | `getTime()`

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

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

- - ### Constructor Detail

    - #### SystemClock

          @Deprecated
          public SystemClock()

      Deprecated.

  - ### Method Detail

    - #### getInstance

          public static SystemClock getInstance()

    - #### getTime

          public long getTime()

      Specified by:
        `getTime` in interface `Clock`

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.