Example #1
0
 public void SetResults(DateTime now, int results)
 {
     Time           = (now - _dateTime).TotalSeconds;
     Date           = JsonTime.Convert(now);
     _results       = results;
     _dateTime      = now;
     _isTestRunning = false;
 }
Example #2
0
    /*
     * 記録された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);
    }
Example #3
0
 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;
     }
 }
Example #4
0
 public JsonTimeAndPositionLog(JsonLocation l, JsonTime t)
 {
     location = l;
     time     = t;
 }
Example #5
0
 public JsonTimeAndPositionLog(double x, double y)
 {
     location   = new JsonLocation(x, y);
     time       = new JsonTime();
     time.mTime = DateTime.Now.TimeOfDay;
 }