pub struct ProcessPowerThrottlingState { /* private fields */ }Expand description
Represents the power throttling state of a process.
Implementations§
Source§impl ProcessPowerThrottlingState
impl ProcessPowerThrottlingState
Sourcepub fn new(
control_mask: PowerThrottlingControlMask,
state_mask: PowerThrottlingStateMask,
) -> Self
pub fn new( control_mask: PowerThrottlingControlMask, state_mask: PowerThrottlingStateMask, ) -> Self
Creates a new ProcessPowerThrottlingState with specified control and state masks
Sourcepub fn from_windows() -> Result<Self, Error>
pub fn from_windows() -> Result<Self, Error>
Create ProcessPowerThrottlingState from current process
Sourcepub fn apply(&self) -> Result<(), Error>
pub fn apply(&self) -> Result<(), Error>
Applies this power throttling state to the current process
Sourcepub fn enable_execution_speed_throttling(&mut self)
pub fn enable_execution_speed_throttling(&mut self)
Creates a ProcessPowerThrottlingState that enables execution speed throttling
Sourcepub fn disable_execution_speed_throttling(&mut self)
pub fn disable_execution_speed_throttling(&mut self)
Creates a ProcessPowerThrottlingState that disables execution speed throttling
Sourcepub fn enable_timer_resolution_throttling(&mut self)
pub fn enable_timer_resolution_throttling(&mut self)
Creates a ProcessPowerThrottlingState that enables timer resolution throttling
Sourcepub fn disable_timer_resolution_throttling(&mut self)
pub fn disable_timer_resolution_throttling(&mut self)
Creates a ProcessPowerThrottlingState that disables timer resolution throttling
Sourcepub fn enable_all_throttling(&mut self)
pub fn enable_all_throttling(&mut self)
Creates a ProcessPowerThrottlingState that enables all available throttling
Sourcepub fn disable_all_throttling(&mut self)
pub fn disable_all_throttling(&mut self)
Creates a ProcessPowerThrottlingState that disables all throttling
Sourcepub fn control_flags(&self) -> PowerThrottlingControlMask
pub fn control_flags(&self) -> PowerThrottlingControlMask
Get control mask as bitflags
Sourcepub fn state_flags(&self) -> PowerThrottlingStateMask
pub fn state_flags(&self) -> PowerThrottlingStateMask
Get state mask as bitflags
Sourcepub fn is_execution_speed_throttled(&self) -> bool
pub fn is_execution_speed_throttled(&self) -> bool
Check if execution speed throttling is enabled
Sourcepub fn is_ignore_timer_resolution_throttled(&self) -> bool
pub fn is_ignore_timer_resolution_throttled(&self) -> bool
Check if timer resolution throttling is enabled
Sourcepub fn is_execution_speed_controlled(&self) -> bool
pub fn is_execution_speed_controlled(&self) -> bool
Check if execution speed control is enabled
Sourcepub fn is_timer_resolution_controlled(&self) -> bool
pub fn is_timer_resolution_controlled(&self) -> bool
Check if timer resolution control is enabled
Sourcepub fn set_version(&mut self, version: u32)
pub fn set_version(&mut self, version: u32)
Sets the underlying version of power throttling API
Trait Implementations§
Source§impl Clone for ProcessPowerThrottlingState
impl Clone for ProcessPowerThrottlingState
Source§fn clone(&self) -> ProcessPowerThrottlingState
fn clone(&self) -> ProcessPowerThrottlingState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more