예제 #1
0
        public void Start(DateTime startTime, DateTime endTime)
        {
            startTime = startTime.PreviousHour();
            U.Log("Beginning at ... " + startTime.Dump());

            if (tof == null)
            {
                tof = new TimeObjFactory(deferred);
            }
            U.Log(" defered: " + deferred.ToString()
                  + "\n start: " + startTime.ToString()
                  + "\n end: " + endTime.ToString()
                  );


            if (first)
            {
                timeObjDictionary  = new SortedDictionary <DateTime, TimeObj>();
                lastProcessedStamp = startTime;
                FillTimeObjDictionary(startTime, endTime);
            }
            else
            {
                U.Log("you want more time?  Use AddTime()");
            }
        }
예제 #2
0
        //making a timeObj that manages this slice of time
        public TimeObj(DateTime dt, TimeObjFactory tof)
        {
            this.tof = tof;

            m_Date      = dt; //make key useful ... Remove for micro usefullnes
            m_Secs      = TMsingleton.SecsSinceMidnight(dt);
            m_EpochSecs = dt.ConvertToUnixTimestamp();

            //m_GameObjects = new Dictionary <EtcMgr.TimeType, Transform>();
            //m_Events = new Dictionary <EventType, Event>();
            //m_Contacts = new Dictionary <object, TimeObj>();

            if (dump)
            {
                U.Log(Dump());
            }
        }