Class SystemClock
- java.lang.Object
-
- com.google.android.exoplayer2.util.SystemClock
-
- All Implemented Interfaces:
Clock
@Deprecated public class SystemClock extends Object implements 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.The standard implementation ofClock
, an instance of which is available viaClock.DEFAULT
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SystemClock()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete 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
public long currentTimeMillis()
Deprecated.Description copied from interface:Clock
Returns the current time in milliseconds since the Unix Epoch.- Specified by:
currentTimeMillis
in interfaceClock
- See Also:
System.currentTimeMillis()
-
elapsedRealtime
public long elapsedRealtime()
Deprecated.- Specified by:
elapsedRealtime
in interfaceClock
- See Also:
SystemClock.elapsedRealtime()
-
uptimeMillis
public long uptimeMillis()
Deprecated.- Specified by:
uptimeMillis
in interfaceClock
- See Also:
SystemClock.uptimeMillis()
-
nanoTime
public long nanoTime()
Deprecated.Description copied from interface:Clock
-
createHandler
public HandlerWrapper createHandler(Looper looper, @Nullable Handler.Callback callback)
Deprecated.Description copied from interface:Clock
Creates aHandlerWrapper
using a specified looper and a specified callback for handling messages.- Specified by:
createHandler
in interfaceClock
- See Also:
Handler(Looper, Handler.Callback)
-
onThreadBlocked
public void onThreadBlocked()
Deprecated.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 interfaceClock
-
-