system-idle-time

Crates.iosystem-idle-time
lib.rssystem-idle-time
version1.0.4
created_at2025-11-29 22:28:45.256419+00
updated_at2025-11-30 18:01:03.030246+00
descriptionA cross-platform Rust library for getting the last user input on the system.
homepage
repositoryhttps://github.com/SpikeHD/system-idle-time
max_upload_size
id1957588
size38,320
SpikeHD (SpikeHD)

documentation

README

system-idle-time

Cross-platform Rust library for getting the last user input on the system.

Supported Platforms

  • Windows
  • Linux (X11 and Wayland via DBus)
  • macOS

Installation

cargo add system-idle-time

Usage

use system_idle_time::get_idle_time;

fn main() {
    match get_idle_time() {
        Ok(idle_time) => println!("Idle time: {} ms", idle_time.as_millis()),
        Err(e) => eprintln!("Error getting idle time: {}", e),
    }
}

Contributing

PRs, issues, etc are all welcome!

Commit count: 0

cargo fmt