Add ppt divisor to get_ppt instead of just setter

This commit is contained in:
NGnius (Graham) 2023-12-11 17:52:22 -05:00
parent a2d5103f12
commit 30ad80f031

View file

@ -191,7 +191,8 @@ impl TGpu for Gpu {
}
fn get_ppt(&self) -> (Option<u64>, Option<u64>) {
(self.fast_ppt, self.slow_ppt)
(self.fast_ppt.map(|x| if let Some(ppt_divisor) = self.limits.ppt_divisor { x / ppt_divisor } else { x }),
self.slow_ppt.map(|x| if let Some(ppt_divisor) = self.limits.ppt_divisor { x / ppt_divisor } else { x }))
}
fn clock_limits(&mut self, limits: Option<MinMax<u64>>) {