pub async fn sys_nanosleep(&self, req: UserInPtr<TimeSpec>) -> SysResult {
        info!("nanosleep: deadline={:?}", req);
        let duration = req.read()?.into();
        use kernel_hal::{thread, timer};
        thread::sleep_until(timer::deadline_after(duration)).await;
        Ok(0)
    }
/// Allows the calling thread to sleep for
/// an interval specified with nanosecond precision
Allows the calling thread to sleep for
an interval specified with nanosecond precision
Allows the calling thread to sleep for an interval specified with nanosecond precision
pub async fn sys_nanosleep(&self, req: UserInPtr<TimeSpec>) -> SysResult {
        info!("nanosleep: deadline={:?}", req);
        let duration = req.read()?.into();
        use kernel_hal::{thread, timer};
        thread::sleep_until(timer::deadline_after(duration)).await;
        Ok(0)
    }
pub async fn sys_nanosleep ( & self , req : UserInPtr < TimeSpec > ) -> SysResult { info ! ( " " req ) ; let duration = req . read ( ) ? . into ( ) ; use kernel_hal :: { thread , timer } ; thread :: sleep_until ( timer :: deadline_after ( duration ) ) . await ; Ok ( 0 ) }
Allows the calling thread to sleep for
an interval specified with nanosecond precision
Allows the calling thread to sleep for an interval specified with nanosecond precision
&self
req
UserInPtr<TimeSpec>
&self
req
UserInPtr<TimeSpec>