![](/media/cache/profiles/8631e5b91354a846f00dbbf16ad94259.jpg.50x50_q85.jpg)
Thread example using mbed 5.7
Diff: main.cpp
- Revision:
- 1:bbbe0fae16f3
- Parent:
- 0:83abbbeb9a3d
- Child:
- 2:b13b343de0f5
diff -r 83abbbeb9a3d -r bbbe0fae16f3 main.cpp --- a/main.cpp Sat Jan 13 18:26:10 2018 +0000 +++ b/main.cpp Wed Jan 09 22:58:08 2019 +0000 @@ -12,7 +12,7 @@ // This method is run in the second thread void ledB_thread() { while (true) { - Thread::wait(250); + wait(0.25); ledB = !ledB; } } @@ -26,7 +26,7 @@ thread.start(callback(ledB_thread)); while (true) { - Thread::wait(400); + wait(0.4); ledA = !ledA; } }