コード例 #1
0
        private void scheduler_SimulationTimeProgress(object sender, SimulationTimeProgressEventArgs e)
        {
            TimeSpan timespan = e.TimeSpan;

            while (_timeline.First != null && timespan >= TimeSpan.Zero)
            {
                TimedSignalEventItem item = _timeline.First.Value;
                item.TimeSpan -= timespan;
                timespan       = -item.TimeSpan;
                if (item.TimeSpan <= TimeSpan.Zero)
                {
                    _scheduler.ScheduleDeltaEvent(item.Item);
                    _timeline.RemoveFirst();
                }
            }
        }
コード例 #2
0
 private void scheduler_SimulationTimeProgress(object sender, SimulationTimeProgressEventArgs e)
 {
     TimeSpan timespan = e.TimeSpan;
     while(_timeline.First != null && timespan >= TimeSpan.Zero)
     {
         TimedSignalEventItem item = _timeline.First.Value;
         item.TimeSpan -= timespan;
         timespan = -item.TimeSpan;
         if(item.TimeSpan <= TimeSpan.Zero)
         {
             _scheduler.ScheduleDeltaEvent(item.Item);
             _timeline.RemoveFirst();
         }
     }
 }