extern crate uptime_lib;
fn main() {
match uptime_lib::get() {
Ok(uptime) => {
println!("uptime: {} seconds", uptime.as_secs_f64());
}
Err(err) => {
eprintln!("uptime: {}", err);
std::process::exit(1);
}
}
}
itchyny (https://github.com/itchyny)
This software is released under the MIT License, see LICENSE.