interface TestAnimationClock : AnimationClockObservable
Interface for animation clocks that can report their idleness and can switch between ticking automatically (e.g., if it's driven by the main loop of the host) and ticking manually.
An idle clock is one that is currently not driving any animations. Typically, that means a clock where no observers are registered. The idleness can be retrieved by isIdle.
Advances the clock by the given number of milliseconds.
Pauses the automatic ticking of the clock.
Resumes the automatic ticking of the clock.
|Inherited extension functions|
Whether the clock is idle or not.
Advances the clock by the given number of milliseconds. It is safe to call this method both when the clock is paused and resumed.
abstract fun pauseClock(): Unit
Pauses the automatic ticking of the clock. The clock shall only tick in response to advanceClock, and shall continue ticking automatically when resumeClock is called. It's safe to call this method when the clock is already paused.
abstract fun resumeClock(): Unit
Resumes the automatic ticking of the clock. It's safe to call this method when the clock is already resumed.
abstract val isIdle: Boolean
Whether the clock is idle or not. An idle clock is one that is not driving animations, which happens (1) when no observers are observing this clock, or (2) when the clock is paused.