6 releases (3 breaking)

0.3.0 Nov 19, 2023
0.2.2 Aug 1, 2022
0.2.1 Jul 18, 2020
0.1.0 Oct 8, 2017
0.0.0 Oct 8, 2017

#130 in Operating systems

Download history 1186/week @ 2024-01-03 997/week @ 2024-01-10 956/week @ 2024-01-17 1253/week @ 2024-01-24 899/week @ 2024-01-31 1158/week @ 2024-02-07 1411/week @ 2024-02-14 1481/week @ 2024-02-21 1257/week @ 2024-02-28 1503/week @ 2024-03-06 1543/week @ 2024-03-13 1490/week @ 2024-03-20 1332/week @ 2024-03-27 1357/week @ 2024-04-03 1229/week @ 2024-04-10 1285/week @ 2024-04-17

5,510 downloads per month
Used in 5 crates

MIT license

6KB
79 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–40MB
~577K SLoC