From 04627992db18e7c7ab5125afa38afee2d130a3e6 Mon Sep 17 00:00:00 2001 From: James Wang Date: Tue, 17 Apr 2018 18:11:59 +0800 Subject: [PATCH] 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()". --- platform/mbed_wait_api.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/platform/mbed_wait_api.h b/platform/mbed_wait_api.h index 32df1798e3..e3130b084c 100644 --- a/platform/mbed_wait_api.h +++ b/platform/mbed_wait_api.h @@ -55,7 +55,9 @@ extern "C" { * @param s number of seconds to wait * * @note - * This func will lock deep sleep. If you want device entry deep sleep mode, please use Thread::wait() + * This func always spin to get an exact number of microseconds, potentially + * impacting power(like can't deep sleep) and multi-thread performance. + * You can avoided by Thread::wait(). */ void wait(float s); @@ -64,7 +66,9 @@ void wait(float s); * @param ms the whole number of milliseconds to wait * * @note - * This func will lock deep sleep. If you want device entry deep sleep mode, please use Thread::wait() + * This func always spin to get an exact number of microseconds, potentially + * impacting power(like can't deep sleep) and multi-thread performance. + * You can avoided by Thread::wait(). */ void wait_ms(int ms); @@ -73,7 +77,8 @@ void wait_ms(int ms); * @param us the whole number of microseconds to wait * * @note - * This func will lock deep sleep. + * This func always spin to get an exact number of microseconds, potentially + * impacting power(like can't deep sleep) and multi-thread performance. */ void wait_us(int us);