collect crates/ and deps/

This commit is contained in:
🪞👃🪞 2025-04-19 01:23:43 +03:00
parent 2f8882f6cd
commit 8fa0f8a409
140 changed files with 23 additions and 21 deletions

22
crates/time/src/perf.rs Normal file
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,
);
}
}
}