Package com.google.android.exoplayer2.util

## Class SystemClock

- java.lang.Object
- - com.google.android.exoplayer2.util.SystemClock

- All Implemented Interfaces:
    `Clock`

      public class SystemClock
      extends Object
      implements Clock

  The standard implementation of `Clock`, an instance of which is available via `Clock.DEFAULT`.

- - ### Field Summary

    - ### Fields inherited from interface com.google.android.exoplayer2.util.Clock

      `DEFAULT`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `SystemClock()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `HandlerWrapper` | `createHandler​(Looper looper, Handler.Callback callback)` | Creates a `HandlerWrapper` using a specified looper and a specified callback for handling messages.
    `long` | `currentTimeMillis()` | Returns the current time in milliseconds since the Unix Epoch.
    `long` | `elapsedRealtime()` |
    `void` | `onThreadBlocked()` | Notifies the clock that the current thread is about to be blocked and won't return until a condition on another thread becomes true.
    `long` | `uptimeMillis()` |

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

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

- - ### Constructor Detail

    - #### SystemClock

          protected SystemClock()

  - ### Method Detail

    - #### currentTimeMillis

          public long currentTimeMillis()

      Description copied from interface: `Clock`
      Returns the current time in milliseconds since the Unix Epoch.
      Specified by:
        `currentTimeMillis` in interface `Clock`
      See Also:
        `System.currentTimeMillis()`

    - #### elapsedRealtime

          public long elapsedRealtime()

      Specified by:
        `elapsedRealtime` in interface `Clock`
      See Also:
        `SystemClock.elapsedRealtime()`

    - #### uptimeMillis

          public long uptimeMillis()

      Specified by:
        `uptimeMillis` in interface `Clock`
      See Also:
        `SystemClock.uptimeMillis()`

    - #### createHandler

          public HandlerWrapper createHandler​(Looper looper,
                                              @Nullable
                                              Handler.Callback callback)

      Description copied from interface: `Clock`
      Creates a `HandlerWrapper` using a specified looper and a specified callback for handling messages.
      Specified by:
        `createHandler` in interface `Clock`
      See Also:
        `Handler(Looper, Handler.Callback)`

    - #### onThreadBlocked

          public void onThreadBlocked()

      Description copied from interface: `Clock`
      Notifies the clock that the current thread is about to be blocked and won't return until a condition on another thread becomes true.

      Should be a no-op for all non-test cases.

      Specified by:
        `onThreadBlocked` in interface `Clock`