uptimer
A multiplatform library to get the uptime of the current process.
- Windows
- Linux
- macOS
Example
= { = "https://github.com/nerixyz/uptimer", = "v0.2.0" }
use sleep;
use Duration;
A multiplatform library to get the uptime of the current process.
uptimer = { git = "https://github.com/nerixyz/uptimer", tag = "v0.2.0" }
use std::thread::sleep;
use std::time::Duration;
fn main() {
sleep(Duration::from_secs(2));
println!("{:?}", uptimer::get());
}