mirror of https://github.com/ARMmbed/mbed-os.git
commit
53293dfeaa
|
@ -223,6 +223,7 @@ void ThisThread::sleep_for(Clock::duration_u32 rel_time)
|
||||||
#if MBED_CONF_RTOS_PRESENT
|
#if MBED_CONF_RTOS_PRESENT
|
||||||
osStatus_t status = osDelay(rel_time.count());
|
osStatus_t status = osDelay(rel_time.count());
|
||||||
MBED_ASSERT(status == osOK);
|
MBED_ASSERT(status == osOK);
|
||||||
|
(void) status;
|
||||||
#else
|
#else
|
||||||
thread_sleep_for(rel_time.count());
|
thread_sleep_for(rel_time.count());
|
||||||
#endif
|
#endif
|
||||||
|
@ -242,10 +243,12 @@ void ThisThread::sleep_until(Clock::time_point abs_time)
|
||||||
if (abs_time - now > wait_for_u32_max) {
|
if (abs_time - now > wait_for_u32_max) {
|
||||||
osStatus_t status = osDelay(wait_for_u32_max.count());
|
osStatus_t status = osDelay(wait_for_u32_max.count());
|
||||||
MBED_ASSERT(status == osOK);
|
MBED_ASSERT(status == osOK);
|
||||||
|
(void) status;
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
osStatus_t status = osDelay((abs_time - now).count());
|
osStatus_t status = osDelay((abs_time - now).count());
|
||||||
MBED_ASSERT(status == osOK);
|
MBED_ASSERT(status == osOK);
|
||||||
|
(void) status;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue