Skip to content

Commit 5b9c70b

Browse files
authored
Use C++ ThisThread::sleep_for API (#206)
1 parent bffe6fe commit 5b9c70b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

main.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
*/
55

66
#include "mbed.h"
7-
#include "platform/mbed_thread.h"
87

98

109
// Blinking rate in milliseconds
11-
#define BLINKING_RATE_MS 500
10+
#define BLINKING_RATE_MS 500
1211

1312

1413
int main()
@@ -18,6 +17,6 @@ int main()
1817

1918
while (true) {
2019
led = !led;
21-
thread_sleep_for(BLINKING_RATE_MS);
20+
ThisThread::sleep_for(BLINKING_RATE_MS);
2221
}
2322
}

0 commit comments

Comments
 (0)