Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Elevator static operating time

  • Loading branch information...
commit d7219328d6db35fe3db0d49baeecd2f42af67614 1 parent e747f87
@ranxian authored
Showing with 12 additions and 8 deletions.
  1. +4 −0 elevator.h
  2. +8 −8 main.cpp
View
4 elevator.h
@@ -7,6 +7,10 @@ class Elevator
int pos;
int nPassenger;
char dir;
+ static int timeToggleDoor;
+ static int timeMove;
+ static int timeSpeedDown;
+ static int timeSpeedUp;
public:
/* Construct Elevator with capacity */
Elevator(int capacity_);
View
16 main.cpp
@@ -8,13 +8,13 @@ double lambda;
int main(int argc, const char * argv[])
{
- lambda = atof(argv[1]);
- srand(time(NULL));
- /* Print Poiss random number */
- for(int i = 0; i < 1000; i++) {
- cout << PoissRand(lambda) << " ";
- }
- cout << endl;
+ lambda = atof(argv[1]);
+ srand(time(NULL));
+ /* Print Poiss random number */
+ for(int i = 0; i < 1000; i++) {
+ cout << PoissRand(lambda) << " ";
+ }
+ cout << endl;
- return 0;
+ return 0;
}
Please sign in to comment.
Something went wrong with that request. Please try again.