Back to Exoplayer

SystemClock (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/util/SystemClock.html

latest5.4 KB
Original Source

Package com.google.android.exoplayer2.util

Class SystemClock

  • java.lang.Object

    • com.google.android.exoplayer2.util.SystemClock
  • All Implemented Interfaces:Clock


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public classSystemClockextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[Clock](Clock.html "interface in com.google.android.exoplayer2.util")

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 of Clock, an instance of which is available via Clock.DEFAULT.

Field Summary

- 

Fields inherited from interface com.google.android.exoplayer2.util.Clock

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 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. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

- 

SystemClock

protected SystemClock()

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 interface ClockSee Also:System.currentTimeMillis()

- 

elapsedRealtime

public long elapsedRealtime()

Deprecated. Specified by:elapsedRealtime in interface ClockSee Also:SystemClock.elapsedRealtime()

- 

uptimeMillis

public long uptimeMillis()

Deprecated. Specified by:uptimeMillis in interface ClockSee Also:SystemClock.uptimeMillis()

- 

nanoTime

public long nanoTime()

Deprecated.

Description copied from interface: Clock

See System.nanoTime() Specified by:nanoTime in interface Clock

- 

createHandler

public[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.

Description copied from interface: Clock

Creates a HandlerWrapper using a specified looper and a specified callback for handling messages. Specified by:createHandler in interface ClockSee 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 interface Clock