devela::_dep::nc

Function timer_create

pub unsafe fn timer_create(
    clock: i32,
    event: Option<&mut sigevent_t>,
    timer_id: &mut i32,
) -> Result<(), i32> 
Available on crate feature dep_nc only.
Expand description

Create a per-process timer

§Examples

let mut timerid = nc::timer_t::default();
let ret = unsafe { nc::timer_create(nc::CLOCK_MONOTONIC, None, &mut timerid) };
assert!(ret.is_ok());