pub unsafe extern "C" fn nrf_modem_os_timedwait(
    context: u32,
    timeout: *mut i32
) -> i32
Expand description

Put a thread to sleep for a specific time or until an event occurs.

The thread is woken by a * nrf_modem_event_notify - call with the same * context - parameter, or after the * timeout - has expired, whichever happens first. If the timeout has not expired, the * timeout - parameter is updated to contain the amount of time left to sleep.

  • context - Library context. @param[in, out] timeout Timeout in milliseconds, or * NRF_MODEM_OS_FOREVER - for no timeout. Specifies the timeout value on input and the remaining time to sleep on output.

Returns 0 The thread is woken before the timeout expired. Returns -NRF_EAGAIN The timeout expired. Returns -NRF_ESHUTDOWN Modem is not initialized, or was shut down.