Interface Clock
-
- All Known Implementing Classes:
FakeClock
,SystemClock
@Deprecated public interface Clock
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 andHandlerWrapper
s created. TheDEFAULT
implementation must be used for all non-test cases.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description HandlerWrapper
createHandler(Looper looper, Handler.Callback callback)
Deprecated.Creates aHandlerWrapper
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.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.
-
-
-
Method Detail
-
currentTimeMillis
long currentTimeMillis()
Deprecated.Returns the current time in milliseconds since the Unix Epoch.- See Also:
System.currentTimeMillis()
-
elapsedRealtime
long elapsedRealtime()
Deprecated.- See Also:
SystemClock.elapsedRealtime()
-
uptimeMillis
long uptimeMillis()
Deprecated.- See Also:
SystemClock.uptimeMillis()
-
nanoTime
long nanoTime()
Deprecated.
-
createHandler
HandlerWrapper createHandler(Looper looper, @Nullable Handler.Callback callback)
Deprecated.Creates aHandlerWrapper
using a specified looper and a specified callback for handling messages.- See Also:
Handler(Looper, Handler.Callback)
-
onThreadBlocked
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.
-
-