lab 5 part 2

Dependencies:   TSI

Revision:
6:71ef35e456ab
Parent:
5:2a9a3d74a1d8
Child:
7:a910936bf4f8
--- a/main.cpp	Tue Feb 19 09:38:31 2019 +0000
+++ b/main.cpp	Thu Feb 20 11:28:36 2020 +0000
@@ -23,7 +23,7 @@
     while (true) {
         signals.wait_any(REDFLAG);
         redLED = false ; // turn on
-        wait(5.0);
+        ThisThread::sleep_for(5000) ; // wait(5.0);
         redLED = true ; // turn off 
         signals.clear(REDFLAG) ;
           // Signal are automatically cleared by wait_any but
@@ -35,7 +35,7 @@
     while (true) {
         signals.wait_any(GREENFLAG);
         greenLED = false ; // turn on 
-        wait(5.0);
+        ThisThread::sleep_for(5000) ; // wait(5.0);
         greenLED = true ; // turn off 
         signals.clear(GREENFLAG) ;
           // Signal are automatically cleared by wait_any but
@@ -57,7 +57,7 @@
         pc.putc(' ') ;
         if (d == 10) signals.set(REDFLAG) ;
         if (d == 20) signals.set(GREENFLAG) ;
-        wait(0.5);  // This polling rate is too slow - increase it
+        ThisThread::sleep_for(500) ; // This polling rate is too slow - increase it
                     // The slower rate maks it easier to output on the terminal
     }
 }
\ No newline at end of file