SlateClock

class SlateClock(deadlineMs: Double)

The slate's clock: it ends at deadlineMs, the break's scheduled end on the wall clock, however long the slate took to load, stalled or looped. Only time between onPresented and onInterrupted counts as presented (on-screen) time, which is reported but never moves the deadline. Pure: every method takes the time (milliseconds); the renderer owns the timer. Mirrors the TS SlateClock.

Constructors

Link copied to clipboard
constructor(deadlineMs: Double)

Properties

Link copied to clipboard

Whether the slate is presenting now.

Functions

Link copied to clipboard
fun complete(nowMs: Double): Boolean

Whether the deadline has been reached.

Link copied to clipboard
fun onInterrupted(nowMs: Double)

The slate stopped presenting (stall, loop seek, background); idempotent.

Link copied to clipboard
fun onPresented(nowMs: Double)

The slate is on screen and playing; idempotent.

Link copied to clipboard

Milliseconds the slate has been on screen so far.

Link copied to clipboard

Milliseconds of wall time left until the deadline.