Permalink
Browse files

Elevator static operating time

  • Loading branch information...
ranxian committed Oct 6, 2012
1 parent e747f87 commit d7219328d6db35fe3db0d49baeecd2f42af67614
Showing with 12 additions and 8 deletions.
  1. +4 −0 elevator.h
  2. +8 −8 main.cpp
View
@@ -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
@@ -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;
}

0 comments on commit d721932

Please sign in to comment.