windows-eco 0.1.0

A safe, idiomatic Rust wrapper for the Windows Power Throttling API.
Documentation
[![CI](https://github.com/kkent030315/windows-eco/actions/workflows/ci.yml/badge.svg)](https://github.com/kkent030315/windows-eco/actions/workflows/ci.yml)

# windows-eco


A safe, idiomatic Rust wrapper for the Windows Power Throttling API.

## Installation


Add this to your `Cargo.toml`:

```toml
[dependencies]
windows-eco = "..."
```

or invoke command:

```bash
cargo add windows-eco
```

## Quick Start


```rust
use std::{thread, time::Duration};

use windows_eco::process::ProcessPowerThrottlingState;

fn main() -> Result<(), windows_eco::Error> {
    let mut state = ProcessPowerThrottlingState::from_windows()?;
    println!("{state}");
    state.enable_all_throttling();
    state.apply()?;
    println!("{state}");

    thread::sleep(Duration::from_secs(30));

    Ok(())
}
```

## Limitations


This library only works on Windows platforms.

## Contributing


Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

## License


MIT License - see the [LICENSE](LICENSE) file for details.