Expand description
Cross-platform library to block the power save functionality in the OS.
let nosleep = NoSleep::new()?;
nosleep.start(NoSleepType::PreventUserIdleDisplaySleep)?;
// Depending on the platform, the block will hold
// until either nosleep will be dropped (Linux)
// or the process exits (macOS) or you manually
// call `nosleep.stop()`