wip: refactor into fewer crates

This commit is contained in:
🪞👃🪞 2025-05-01 17:39:29 +03:00
parent c367a0444e
commit 77703d83a5
105 changed files with 64 additions and 131 deletions

View file

@ -0,0 +1,22 @@
use crate::*;
use tengri::tui::PerfModel;
pub trait JackPerfModel {
fn update_from_jack_scope (&self, t0: Option<u64>, scope: &ProcessScope);
}
impl JackPerfModel for PerfModel {
fn update_from_jack_scope (&self, t0: Option<u64>, scope: &ProcessScope) {
if let Some(t0) = t0 {
let t1 = self.clock.raw();
self.used.store(
self.clock.delta_as_nanos(t0, t1) as f64,
Relaxed,
);
self.window.store(
scope.cycle_times().unwrap().period_usecs as f64,
Relaxed,
);
}
}
}