ActiveRun

data class ActiveRun(val id: Int = 0, val startTime: Long, val startEventIndex: Int)

Currently active run. Otherwise immutable, but the meter states are internally mutable.

Constructors

Link copied to clipboard
constructor(id: Int = 0, startTime: Long, startEventIndex: Int)

Properties

Link copied to clipboard
val id: Int = 0

ID of the run

Link copied to clipboard

index of the first associated event

Link copied to clipboard

The start timestamp, @see System.currentTimeMillis()

Functions

Link copied to clipboard
fun finish(stopTime: Long, sessionEventCount: Int, meterStates: List<MeterState>): RunSummary

Converts the active run into an immutable, archived run. Requires a stop time and total event count to calculate the final run.

Link copied to clipboard
open override fun toString(): String