public static Fluent CreateStart() { Fluent fluent = new Fluent(); fluent.start = DateTime.Now; return(fluent); }
public TimeSpan GetLastLap() { if (laps == null || laps.Count == 0) { return(new TimeSpan(0)); } Fluent f = (Fluent)laps[laps.Count - 1]; return(f.GetTimeSpan()); }
public static Fluent Create(DateTime start, string task) { Fluent f = new Fluent(); f.start = start; if (task != null && task.Length > 0) { f.task = task; } return(f); }
public void Start() { //If it is already started do nothing. Fluent fluent = GetLastFluent(); if (fluent != null && fluent.Stopped == false) { return; } fluent = Fluent.CreateStart(); laps.Add(fluent); }
public void Stop(string task) { //If no last lap or already stopped do nothing Fluent fluent = GetLastFluent(); if (fluent == null) { return; } if (fluent.Stopped) { return; } fluent.Stop(); fluent.Task = task; }
internal void AddFluent(DateTime start, DateTime end, string task) { laps.Add(Fluent.Create(start, end, task)); }