private List <Awakeness> GetAwakenessData(TimePoint[] sleepData) { List <Awakeness> ret = new List <Awakeness>(); TimePoint lastAwake = sleepData[0]; for (int i = 1; i < sleepData.Length; i++) { TimePoint current = sleepData[i]; if (current.State == ConciousnessState.Asleep) { Awakeness newAwakeness = new Awakeness() { Start = lastAwake.Time, End = current.Time }; ret.Add(newAwakeness); } else { lastAwake = current; } } return(ret); }
public Minute(MinuteInDay index, Awakeness state) { Index = index; State = state; }