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

#59 in Operating systems

Download history 3216/week @ 2024-11-30 3188/week @ 2024-12-07 2725/week @ 2024-12-14 1254/week @ 2024-12-21 1409/week @ 2024-12-28 3463/week @ 2025-01-04 2444/week @ 2025-01-11 2849/week @ 2025-01-18 2936/week @ 2025-01-25 3015/week @ 2025-02-01 2320/week @ 2025-02-08 2310/week @ 2025-02-15 2181/week @ 2025-02-22 2528/week @ 2025-03-01 2276/week @ 2025-03-08 2596/week @ 2025-03-15

10,008 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
~476K SLoC