extern crate libc;
extern crate sysctl;
use libc::c_int;
#[derive(Debug)]
#[repr(C)]
struct ClockInfo {
hz: c_int,
tick: c_int,
spare: c_int,
stathz: c_int,
profhz: c_int,
}
fn main() {
let oid: Vec<i32> = vec![libc::CTL_KERN, libc::KERN_CLOCKRATE];
let val: Box<ClockInfo> = sysctl::Ctl { oid }.value_as().expect("could not get value");
println!("{:?}", val);
}