Function mprober_lib::uptime::get_uptime [−][src]
pub fn get_uptime() -> Result<Uptime, ScannerError>
Get the uptime by reading the /proc/uptime
file.
extern crate mprober_lib; use mprober_lib::uptime; let uptime = uptime::get_uptime().unwrap(); println!("{:#?}", uptime);