6 releases (3 breaking)

0.3.0 Nov 19, 2023
0.2.2 Aug 1, 2022
0.2.1 Jul 18, 2020
0.1.0 Oct 8, 2017
0.0.0 Oct 8, 2017

#83 in Operating systems

Download history 888/week @ 2023-08-20 1133/week @ 2023-08-27 1229/week @ 2023-09-03 1170/week @ 2023-09-10 1226/week @ 2023-09-17 899/week @ 2023-09-24 776/week @ 2023-10-01 981/week @ 2023-10-08 935/week @ 2023-10-15 913/week @ 2023-10-22 939/week @ 2023-10-29 1037/week @ 2023-11-05 996/week @ 2023-11-12 1229/week @ 2023-11-19 759/week @ 2023-11-26 955/week @ 2023-12-03

3,968 downloads per month
Used in 4 crates

MIT license

6KB
79 lines

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.

Dependencies

~0.3–48MB
~682K SLoC