Pawel Poplawski
/
mbed-os-example-blinky-deep-sleep-test
Deep sleep tests
Diff: main.cpp
- Revision:
- 99:688a02d088d4
- Parent:
- 98:f2d7e14c84a1
diff -r f2d7e14c84a1 -r 688a02d088d4 main.cpp --- a/main.cpp Wed Sep 04 12:00:04 2019 +0100 +++ b/main.cpp Thu Sep 19 09:01:05 2019 +0000 @@ -27,6 +27,15 @@ // Following the main thread wait, report on the current system status sys_state.report_state(); count = 0; + + mbed_stats_cpu_t stats; + mbed_stats_cpu_get(&stats); + printf("Uptime: %llu ", stats.uptime / 1000); + printf("Sleep time: %llu ", stats.sleep_time / 1000); + printf("Deep Sleep: %llu\n", stats.deep_sleep_time / 1000); + + wait(1.0); + } ++count; }