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

#129 in Operating systems

Download history 1679/week @ 2024-07-03 1466/week @ 2024-07-10 1240/week @ 2024-07-17 1868/week @ 2024-07-24 1688/week @ 2024-07-31 1642/week @ 2024-08-07 1726/week @ 2024-08-14 1947/week @ 2024-08-21 2210/week @ 2024-08-28 2195/week @ 2024-09-04 1931/week @ 2024-09-11 2153/week @ 2024-09-18 2025/week @ 2024-09-25 2108/week @ 2024-10-02 1648/week @ 2024-10-09 1589/week @ 2024-10-16

7,858 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–36MB
~543K SLoC