public void SetResults(DateTime now, int results) { Time = (now - _dateTime).TotalSeconds; Date = JsonTime.Convert(now); _results = results; _dateTime = now; _isTestRunning = false; }
/* * 記録されたTAPL(TimaAndPositionLog)のタイムスタンプからbaseTimeを引いた状態にする */ public List <JsonTimeAndPositionLog> reTimeStampByBaseTime(List <JsonTimeAndPositionLog> list, TimeSpan baseTime) { List <JsonTimeAndPositionLog> res = new List <JsonTimeAndPositionLog> (); for (int i = 0; i < list.Count; i++) { JsonTime jt = new JsonTime(); jt.mTime = list [i].mTime.Subtract(baseTime); res.Add(new JsonTimeAndPositionLog(list[i].location, jt)); } return(res); }
public void SetCurrentState(DateTime now, int state) { if (now == new DateTime()) { Init(); } else { Time = (now - _dateTime).TotalSeconds; Date = JsonTime.Convert(now); _previousState = _currentState; _currentState = state; _dateTime = now; } }
public JsonTimeAndPositionLog(JsonLocation l, JsonTime t) { location = l; time = t; }
public JsonTimeAndPositionLog(double x, double y) { location = new JsonLocation(x, y); time = new JsonTime(); time.mTime = DateTime.Now.TimeOfDay; }