using EscapeRoomEngine.Engine.Runtime.Utilities; using Realms; namespace EscapeRoomEngine.Engine.Runtime.Measurements { /// /// A single measurement, consisting of when a puzzle was started and solved, stored in the database. /// public class PuzzleMeasurement : EmbeddedObject { /// /// The relative time since the engine was initialised of when this puzzle was started. /// public float TimeStarted { get; set; } /// /// The relative time since the engine was initialised of when this puzzle was solved. /// public float TimeSolved { get; set; } /// /// The total time taken to solve this puzzle during this measurement. /// public float Time => TimeSolved - TimeStarted; public override string ToString() { return $"{Time.ToTimeSpan():m':'ss}"; } } }