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

#86 in Operating systems

Download history 1389/week @ 2024-03-25 1389/week @ 2024-04-01 1234/week @ 2024-04-08 1564/week @ 2024-04-15 1683/week @ 2024-04-22 1230/week @ 2024-04-29 943/week @ 2024-05-06 1213/week @ 2024-05-13 1309/week @ 2024-05-20 1097/week @ 2024-05-27 2864/week @ 2024-06-03 6228/week @ 2024-06-10 6442/week @ 2024-06-17 7076/week @ 2024-06-24 2715/week @ 2024-07-01 1802/week @ 2024-07-08

18,334 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.3–36MB
~544K SLoC