fn step_idle_times(&mut self, dt: Seconds, num_operations: f64) {
            let frequency = self.get_p_state().frequency;
            let total_cpu_time = num_operations / frequency;
            let active_time_per_core = total_cpu_time.div_scalar(self.cpu_params.num_cpus as f64);

            // For now, we require that the cores do not saturate.
            assert!(active_time_per_core <= dt);

            let idle_time_per_core = dt - active_time_per_core;
            self.idle_times
                .iter_mut()
                .for_each(|x| *x += Nanoseconds(idle_time_per_core.into_nanos()));
        }
/// Steps accumulated idle times of the simulated CPUs ahead by `dt`.
Steps accumulated idle times of the simulated CPUs ahead by `dt`.
Steps accumulated idle times of the simulated CPUs ahead by ` dt ` .
fn step_idle_times(&mut self, dt: Seconds, num_operations: f64) {
            let frequency = self.get_p_state().frequency;
            let total_cpu_time = num_operations / frequency;
            let active_time_per_core = total_cpu_time.div_scalar(self.cpu_params.num_cpus as f64);
            // For now, we require that the cores do not saturate.
            assert!(active_time_per_core <= dt);
            let idle_time_per_core = dt - active_time_per_core;
            self.idle_times
                .iter_mut()
                .for_each(|x| *x += Nanoseconds(idle_time_per_core.into_nanos()));
        }
fn step_idle_times ( & mut self , dt : Seconds , num_operations : f64 ) { let frequency = self . get_p_state ( ) . frequency ; let total_cpu_time = num_operations / frequency ; let active_time_per_core = total_cpu_time . div_scalar ( self . cpu_params . num_cpus as f64 ) ; // For now, we require that the cores do not saturate. assert ! ( active_time_per_core dt ) ; let idle_time_per_core = dt - active_time_per_core ; self . idle_times . iter_mut ( ) . for_each ( | x | * x += Nanoseconds ( idle_time_per_core . into_nanos ( ) ) ) ; }
Steps accumulated idle times of the simulated CPUs ahead by `dt`.
Steps accumulated idle times of the simulated CPUs ahead by ` dt ` .
&mut self
dt
Seconds
num_operations
f64