refactor(timer): elapsed is active time from start

This commit is contained in:
Carlos Valente
2026-06-28 19:12:22 +02:00
committed by Carlos Valente
parent 4f4626a163
commit 161ab3fe13
12 changed files with 196 additions and 6 deletions
@@ -10,7 +10,7 @@ export const runtimeStorePlaceholder: Readonly<RuntimeStore> = {
addedTime: 0,
current: null, // changes on every update
duration: null, // only changes if event changes
elapsed: null, // changes on every update
elapsed: null, // active time from start, changes on every update
expectedFinish: null, // change can only be initiated by user, can roll over midnight
phase: TimerPhase.None, // can change on update or user action
playback: Playback.Stop, // change initiated by user
@@ -21,7 +21,7 @@ export type TimerState = {
current: MaybeNumber;
/** Total duration of the running event */
duration: MaybeNumber;
/** Time elapsed since the timer started */
/** Active time elapsed since the timer started */
elapsed: MaybeNumber;
/** Timestamp of the expected finish time */
expectedFinish: MaybeNumber;