Skip to content

Commit 0462799

Browse files
author
James Wang
committed
Accept Kevin Bracey's review, "wait_ms() and wait(float) always spin to get an exact number of microseconds, potentially impacting power and multi-thread performance. Again, avoided by Thread::wait()".
1 parent efc228f commit 0462799

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

platform/mbed_wait_api.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ extern "C" {
5555
* @param s number of seconds to wait
5656
*
5757
* @note
58-
* This func will lock deep sleep. If you want device entry deep sleep mode, please use Thread::wait()
58+
* This func always spin to get an exact number of microseconds, potentially
59+
* impacting power(like can't deep sleep) and multi-thread performance.
60+
* You can avoided by Thread::wait().
5961
*/
6062
void wait(float s);
6163

@@ -64,7 +66,9 @@ void wait(float s);
6466
* @param ms the whole number of milliseconds to wait
6567
*
6668
* @note
67-
* This func will lock deep sleep. If you want device entry deep sleep mode, please use Thread::wait()
69+
* This func always spin to get an exact number of microseconds, potentially
70+
* impacting power(like can't deep sleep) and multi-thread performance.
71+
* You can avoided by Thread::wait().
6872
*/
6973
void wait_ms(int ms);
7074

@@ -73,7 +77,8 @@ void wait_ms(int ms);
7377
* @param us the whole number of microseconds to wait
7478
*
7579
* @note
76-
* This func will lock deep sleep.
80+
* This func always spin to get an exact number of microseconds, potentially
81+
* impacting power(like can't deep sleep) and multi-thread performance.
7782
*/
7883
void wait_us(int us);
7984

0 commit comments

Comments
 (0)