Package com.google.android.exoplayer2.util

## Interface Clock

- All Known Implementing Classes:
    `FakeClock`, `SystemClock`

      public interface Clock

  An interface through which system clocks can be read and `HandlerWrapper`s created. The `DEFAULT` implementation must be used for all non-test cases.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static Clock` | `DEFAULT` | Default `Clock` to use for all non-test cases.

  - ### Method Summary

    All Methods Instance Methods Abstract 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()` |

- - ### Field Detail

    - #### DEFAULT

          static final Clock DEFAULT

      Default `Clock` to use for all non-test cases.

  - ### Method Detail

    - #### currentTimeMillis

          long currentTimeMillis()

      Returns the current time in milliseconds since the Unix Epoch.
      See Also:
        `System.currentTimeMillis()`

    - #### elapsedRealtime

          long elapsedRealtime()

      See Also:
        `SystemClock.elapsedRealtime()`

    - #### uptimeMillis

          long uptimeMillis()

      See Also:
        `SystemClock.uptimeMillis()`

    - #### createHandler

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

      Creates a `HandlerWrapper` using a specified looper and a specified callback for handling messages.
      See Also:
        `Handler(Looper, Handler.Callback)`

    - #### onThreadBlocked

          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.

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