6 releases
0.2.1 | Nov 20, 2022 |
---|---|
0.2.0 | May 8, 2022 |
0.2.0-rc.2 | May 7, 2022 |
0.2.0-rc.1 | May 4, 2022 |
0.1.0 | Apr 21, 2022 |
#3 in #caffeine
401 downloads per month
Used in tauri-plugin-nosleep
12KB
121 lines
nosleep
Cross-platform library to block the power save function in the OS.
use nosleep::{NoSleep, NoSleepType};
let mut nosleep = NoSleep::new().unwrap();
nosleep
.start(NoSleepType::PreventUserIdleDisplaySleep)
.unwrap();
std::thread::sleep(std::time::Duration::from_millis(180_000));
nosleep.stop().unwrap(); // Not strictly needed
Dependencies
~1–27MB
~373K SLoC