7 unstable releases

0.3.1 Jun 28, 2024
0.3.0 Nov 19, 2023
0.2.2 Aug 1, 2022
0.2.1 Jul 18, 2020
0.0.0 Oct 8, 2017

#140 in Operating systems

Download history 1573/week @ 2024-10-13 1915/week @ 2024-10-20 1831/week @ 2024-10-27 1633/week @ 2024-11-03 1695/week @ 2024-11-10 2183/week @ 2024-11-17 3062/week @ 2024-11-24 3261/week @ 2024-12-01 3133/week @ 2024-12-08 2777/week @ 2024-12-15 1279/week @ 2024-12-22 1396/week @ 2024-12-29 3453/week @ 2025-01-05 2455/week @ 2025-01-12 2865/week @ 2025-01-19 2795/week @ 2025-01-26

11,669 downloads per month
Used in 5 crates

MIT license

6KB
80 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.2–34MB
~488K SLoC