示例#1
0
 private void StartRunning(TimeSpan forHowLong)
 {
     Console.WriteLine("{0} : {1} starting job {2}.", Model.Executive.Now, Name, m_jobNum);
     if (m_state.CurrentState == SADO_States.Idle)
     {
         m_state.ToState(SADO_States.Running);
         DateTime runUntil = Model.Executive.Now + forHowLong;
         Model.Executive.RequestEvent(FinishRunning, runUntil, null);
     }
 }
示例#2
0
 internal void DoService(Customer customer)
 {
     TellerState.ToState(Basic.TellerState.Busy);
     m_model.Executive.CurrentEventController.SuspendFor(TimeSpan.FromMinutes(ServiceTime.GetNext()));
     TellerState.ToState(Basic.TellerState.Idle);
 }