Trait spectrusty::chip::HostConfig
source · pub trait HostConfig {
const CPU_HZ: u32;
const FRAME_TSTATES: i32;
fn effective_cpu_rate(multiplier: f64) -> f64 { ... }
fn effective_frame_duration_nanos(multiplier: f64) -> u32 { ... }
fn effective_frame_duration(multiplier: f64) -> Duration { ... }
fn frame_duration_nanos() -> u32 { ... }
fn frame_duration() -> Duration { ... }
}
Expand description
A helper trait for accessing parameters of well-known host configurations.
Required Associated Constants§
sourceconst FRAME_TSTATES: i32
const FRAME_TSTATES: i32
The number of CPU cycles (T-states) in a single execution frame.
Provided Methods§
sourcefn effective_cpu_rate(multiplier: f64) -> f64
fn effective_cpu_rate(multiplier: f64) -> f64
Returns the CPU rate (T-states / second) after multiplying it by the multiplier
.
sourcefn effective_frame_duration_nanos(multiplier: f64) -> u32
fn effective_frame_duration_nanos(multiplier: f64) -> u32
Returns the duration of a single execution frame in nanoseconds after multiplying
the CPU rate by the multiplier
.
sourcefn effective_frame_duration(multiplier: f64) -> Duration
fn effective_frame_duration(multiplier: f64) -> Duration
Returns the duration of a single execution frame after multiplying the CPU rate by
the multiplier
.
sourcefn frame_duration_nanos() -> u32
fn frame_duration_nanos() -> u32
Returns the duration of a single execution frame in nanoseconds.
sourcefn frame_duration() -> Duration
fn frame_duration() -> Duration
Returns the duration of a single execution frame.