t
Fork of mbed-dev by
Diff: platform/mbed_wait_api_rtos.cpp
- Revision:
- 151:5eaa88a5bcc7
- Parent:
- 149:156823d33999
- Child:
- 160:d5399cc887bb
diff -r 02e0a0aed4ec -r 5eaa88a5bcc7 platform/mbed_wait_api_rtos.cpp --- a/platform/mbed_wait_api_rtos.cpp Tue Nov 08 17:45:16 2016 +0000 +++ b/platform/mbed_wait_api_rtos.cpp Thu Nov 24 17:03:03 2016 +0000 @@ -37,13 +37,10 @@ int ms = us / 1000; if ((ms > 0) && core_util_are_interrupts_enabled()) { Thread::wait((uint32_t)ms); - us -= ms * 1000; } // Use busy waiting for sub-millisecond delays, or for the whole // interval if interrupts are not enabled - if (us > 0) { - while((us_ticker_read() - start) < (uint32_t)us); - } + while ((us_ticker_read() - start) < (uint32_t)us); } #endif // #if MBED_CONF_RTOS_PRESENT