Function clock_gettime
Source pub fn clock_gettime(clock_id: u32, tp: &mut TimeSpec) -> Result<usize, Error>
Expand description
Get the current system time.
§Arguments
clock_id - Clock identifier (CLOCK_MONOTONIC or CLOCK_REALTIME)
tp - Mutable reference to timespec structure to fill
§Returns
Ok(0) on success
Err(Error::InvalidArgument) if clock_id is invalid
Err(Error::Fault) if tp pointer is invalid