Skip to content
forked from pevers/nosleep

Cross-platform library to block the power save function in the OS

Notifications You must be signed in to change notification settings

holoffice/nosleep

 
 

Repository files navigation

nosleep

Continuous Integration (macOS) Continuous Integration (Linux) Continuous Integration (Windows) license version Crates.io

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

About

Cross-platform library to block the power save function in the OS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 94.3%
  • Objective-C 5.7%