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 2473/week @ 2024-11-21 3500/week @ 2024-11-28 3315/week @ 2024-12-05 2636/week @ 2024-12-12 1820/week @ 2024-12-19 1203/week @ 2024-12-26 3009/week @ 2025-01-02 2739/week @ 2025-01-09 2614/week @ 2025-01-16 2934/week @ 2025-01-23 3079/week @ 2025-01-30 2338/week @ 2025-02-06 2352/week @ 2025-02-13 2176/week @ 2025-02-20 2542/week @ 2025-02-27 2189/week @ 2025-03-06

9,689 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
~483K SLoC