perf counter for render

This commit is contained in:
🪞👃🪞 2025-01-14 16:45:58 +01:00
parent c9677c87d8
commit 1b7f0e0b93
17 changed files with 331 additions and 358 deletions

View file

@ -34,6 +34,17 @@ impl PerfModel {
None
}
}
pub fn get_t1 (&self, t0: Option<u64>) -> Option<std::time::Duration> {
if let Some(t0) = t0 {
if self.enabled {
Some(self.clock.delta(t0, self.clock.raw()))
} else {
None
}
} else {
None
}
}
pub fn update (&self, t0: Option<u64>, scope: &ProcessScope) {
if let Some(t0) = t0 {
let t1 = self.clock.raw();