uptime_lib

Crates.iouptime_lib
lib.rsuptime_lib
version0.3.1
sourcesrc
created_at2017-10-08 04:07:15.076216
updated_at2024-06-28 23:43:55.815867
descriptionMulti-platform uptime library
homepage
repositoryhttps://github.com/itchyny/uptime-rs
max_upload_size
id34785
size16,318
itchyny (itchyny)

documentation

README

Multi-platform uptime library for Rust

CI Status crates.io release MIT License

Example

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);
        }
    }
}

Author

itchyny (https://github.com/itchyny)

License

This software is released under the MIT License, see LICENSE.

Commit count: 57

cargo fmt