docs/doc/reference/com/google/android/exoplayer2/util/Clock.html
Package com.google.android.exoplayer2.util
FakeClock, SystemClock[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public interfaceClock
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
An interface through which system clocks can be read and HandlerWrappers created. The DEFAULT implementation must be used for all non-test cases.
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static Clock | DEFAULT |
Deprecated.
Default Clock to use for all non-test cases.
|
All Methods Instance Methods Abstract Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| HandlerWrapper | createHandler(Looper looper, Handler.Callback callback) |
Deprecated.
Creates a HandlerWrapper using a specified looper and a specified callback for handling messages.
|
| long | currentTimeMillis() |
Deprecated.
Returns the current time in milliseconds since the Unix Epoch.
|
| long | elapsedRealtime() |
Deprecated.
|
| long | nanoTime() |
Deprecated.
See System.nanoTime()
|
| void | onThreadBlocked() |
Deprecated.
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() |
Deprecated.
|
-
static final[Clock](Clock.html "interface in com.google.android.exoplayer2.util")DEFAULT
Deprecated.
Default Clock to use for all non-test cases.
-
long currentTimeMillis()
Deprecated.
Returns the current time in milliseconds since the Unix Epoch.
See Also:System.currentTimeMillis()
-
long elapsedRealtime()
Deprecated.
See Also:SystemClock.elapsedRealtime()
-
long uptimeMillis()
Deprecated.
See Also:SystemClock.uptimeMillis()
-
long nanoTime()
Deprecated.
-
[HandlerWrapper](HandlerWrapper.html "interface in com.google.android.exoplayer2.util")createHandler([Looper](https://developer.android.com/reference/android/os/Looper.html "class or interface in android.os")looper,
@Nullable[Handler.Callback](https://developer.android.com/reference/android/os/Handler.Callback.html "class or interface in android.os")callback)
Deprecated.
Creates a HandlerWrapper using a specified looper and a specified callback for handling messages.
See Also:Handler(Looper, Handler.Callback)
-
void onThreadBlocked()
Deprecated.
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.