电梯模拟课程设计实验报告
} } //cout<<clock()/TIME-delay/TIME<<","<<nexttime/TIME<<":"<<"wait 计时结束"<<endl; return 0; }
void times()//保存时间 { biaozhi.Push(clock()); timesum=clock(); //cout<<timesum/TIME<<endl; }
void timer()//恢复时间 { delay+=clock()-biaozhi.Pop(); //cout<<delay/TIME<<endl; }
//----------------------------------电梯相关的活动------------------------------------
int e1 ()//开门 { wait(20); cout<<clock()/TIME-delay/TIME<<","<<nexttime/TIME<<":"<<"电梯开门。"<<endl; return 0; }
int e2()//在本层出电梯的人出栈 { while(!k[nowfloor].StackEmpty()) { n=k[nowfloor].Pop(); wait(25); n.getout(); renshu--; }