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 andHandlerWrappers created. TheDEFAULTimplementation must be used for all non-test cases.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description HandlerWrappercreateHandler(Looper looper, Handler.Callback callback)Deprecated.Creates aHandlerWrapperusing a specified looper and a specified callback for handling messages.longcurrentTimeMillis()Deprecated.Returns the current time in milliseconds since the Unix Epoch.longelapsedRealtime()Deprecated.longnanoTime()Deprecated.voidonThreadBlocked()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.longuptimeMillis()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 aHandlerWrapperusing 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.
-
-