diff --git a/assignment2_handout.c b/assignment2_handout.c index 3f640eb..606e84b 100644 --- a/assignment2_handout.c +++ b/assignment2_handout.c @@ -57,7 +57,7 @@ #define true 1 #endif // Print the number of people in the lifts & on the floors -#define POPULATIONS +//#define POPULATIONS // -------------------------------------------------- // Information about a floor in the building @@ -112,7 +112,7 @@ void print_at_xy_fast(int x, int y, const char *s) gotoxy(x, y); // Slow things down - //Sleep(0); + Sleep(0); // Print the string printf("%s", s); @@ -120,7 +120,7 @@ void print_at_xy_fast(int x, int y, const char *s) // Move cursor out of the way gotoxy(42, NFLOORS + 2); // flush the stream and release the semaphore - fflush(stdout); + //fflush(stdout); semaphore_signal(&printSemaphore); } #endif @@ -136,7 +136,7 @@ void print_at_xy(int x, int y, const char *s) gotoxy(x, y); // Slow things down - //Sleep(1); + Sleep(1); // Print the string printf("%s", s); @@ -144,7 +144,7 @@ void print_at_xy(int x, int y, const char *s) // Move cursor out of the way gotoxy(42, NFLOORS + 2); // flush the stream and release the semaphore - fflush(stdout); + //fflush(stdout); semaphore_signal(&printSemaphore); } @@ -525,7 +525,7 @@ void *update_floor_counts(void *p) } } - Sleep(0); + //Sleep(0); } #endif