Example to demonstrate usage of `mbed_stats_cpu_get()` API usage

Files at this revision

API Documentation at this revision

Comitter:
mbed_official
Date:
Thu Jan 03 20:00:32 2019 +0000
Parent:
17:485f79808c57
Child:
19:b23504581a47
Commit message:
Use updated wait API's and sleep_for instead of deprecated `wait`

.
Commit copied from https://github.com/ARMmbed/mbed-os-example-cpu-stats

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu Jan 03 15:45:33 2019 +0000
+++ b/main.cpp	Thu Jan 03 20:00:32 2019 +0000
@@ -35,7 +35,7 @@
 
     while(i--) {
         led1 = !led1;
-        wait_us(wait_time);
+        wait_ms(wait_time);
     }
 }
 
@@ -65,7 +65,7 @@
 
     // Steadily increase the system load
     for (int count = 1; ; count++) {
-        Thread::wait(LOOP_TIME);
+        ThisThread::sleep_for(LOOP_TIME);
         if (wait_time <= 0) {
             break;
         }