zephyr::raw

Function k_sleep

Source
pub unsafe extern "C" fn k_sleep(timeout: k_timeout_t) -> i32
Expand description

@brief Put the current thread to sleep.

This routine puts the current thread to sleep for @a duration, specified as a k_timeout_t object.

@param timeout Desired duration of sleep.

@return Zero if the requested time has elapsed or the time left to sleep rounded up to the nearest millisecond (e.g. if the thread was awoken by the \ref k_wakeup call). Will be clamped to INT_MAX in the case where the remaining time is unrepresentable in an int32_t.